【发布时间】:2014-07-02 13:15:12
【问题描述】:
我在书写和阅读UIButton 的标题时遇到了麻烦。
我的问题:
// If I execute this line of code everything works fine, the title gets changed in the UI
[self.lastButtonPressed setTitle:stringDate forState:UIControlStateNormal];
// In the next line of code I want to read the title I've set before, but everything I get is the title of the UIButton before I changed the title.
NSString *myText = [self.lastButtonPressed.titleLabel.text];
[UIButton setTitle] 有可能被异步调用吗?如果是,是否有可能使此调用同步?
【问题讨论】:
标签: ios objective-c asynchronous uibutton