I have been wondering for quite a long time what to do with this.
Suppose I will be creating an UILabel, this label will contain a name. So without giving it much of thought, I will name this UILabel |name|.
Then I will have an NSString which will hold the actual string of the name. So I think naming the string |name| would be more appropriate right?
But what would I name the UILabel then?
I thought about naming it labelName.
But this is hungarian notation which is highly discouraged?
This is a dead end?
Objective-C is a verbose language. It's common to include the type of variables and parameters when naming them.
UILabel *nameLabel = ...
NSString *name = ...
In case of primitive values (or even NSStrings and NSNumbers) usually the type is omitted.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With