Hi guys, I'm currently learning Objective C for iPhone dev and using a lot of the documentation to help understand the syntax. I've come across a property that I can't find declared anywhere.
For the class UILabel there is a property called "text". Which you can see in the UILabel documentation. However there is also a property called "setText" which allows you to change a UILabel object. However "setText" is nowhere to be found!
The quick help for setText is as follows:
Name: setText:
Declaration: @property(nonatomic, copy) NSString *text
Availability: iOS (2.0 and later)
Abstract: The text displayed by the label.
Declared in: UILabel.h
Reference: UILabel Class Reference
When you look in UILabel.h or the documentation for UILabel there is no such thing as "setText" --- only "text". How can I use "setText" if it isn't declared?
E. [display setText:[NSString stringWithFormat
"%g", result]]; works fine.
For the class UILabel there is a property called "text". Which you can see in the UILabel documentation. However there is also a property called "setText" which allows you to change a UILabel object. However "setText" is nowhere to be found!
The quick help for setText is as follows:
Name: setText:
Declaration: @property(nonatomic, copy) NSString *text
Availability: iOS (2.0 and later)
Abstract: The text displayed by the label.
Declared in: UILabel.h
Reference: UILabel Class Reference
When you look in UILabel.h or the documentation for UILabel there is no such thing as "setText" --- only "text". How can I use "setText" if it isn't declared?
E. [display setText:[NSString stringWithFormat