Вы были прав, чтобы использовать WaitForSeconds. Но я подозреваю, что вы пытались использовать его без сопрограмм. Вот как это должно работать:
public void SomeMethod()
{
StartCoroutine(SomeCoroutine());
}
private IEnumerator SomeCoroutine()
{
TextUI.text = "Welcome to Number Wizard!";
yield return WaitForSeconds (3);
TextUI.text = ("The highest number you can pick is " + max);
yield return WaitForSeconds (3);
TextUI.text = ("The lowest number you can pick is " + min);
}
Можете ли вы попробовать
NSAnimationContext.runAnimationGroup({ (context) in
context.allowsImplicitAnimation = true
cell.progressWidthConstraint.animator().constant = CGFloat(progress)
context.duration = 0.3
cell.layoutSubtreeIfNeeded()
})
animator()
, а. Интересно. Большое спасибо! – Clifton Labrum 13 July 2018 в 21:17