You do not show the code where the UILabel is set, so it is difficult to be sure.Do you usevar question = [1+1=2, 2+2=22]somewhere ?But most likely you have a synchronization issue, because UILabel is not updated yet, but code has moved after. That's often the case when you have an alert and try to use the result of the alert outside of the alert code.There are several solution:- using completion handlers- setting semaphoresBut once again, need to see your code first.
Topic:
Programming Languages
SubTopic:
Swift
Tags: