- (IBAction)start:(UIButton *)sender {
NSString *t=@"123"; // line 1
self.detailDescriptionLabel.text=t;
}
The syntax check is correct, but when I build and run it on iphone, it breaks out at line 1 and sending the error message like “variable is not a CFString”
How to solve this problem?
And it is working when I wrote this:
- (IBAction)start:(UIButton *)sender {
self.detailDescriptionLabel.text=nil;
}
I really think the problem lies in how to correctly assign a string constant to a UILabel’s text property.
Ok, it is stupid… I wrongly pressed the shotcut key and a breakpoint to it…..So actually there is no mistakes in the code, just my mistake in the XCode IDE.