Make App Pie

Training for Developers and Artists

And Another thing: Zero Parameters

So I keep forgetting how to convert from NSString to values. there is a series of methods defined in the NSstring class to do this, such as intValue and floatValue. I keep thinking this backwards, getting confused on a case where there is no parameters in a message. the data is already part of the object.

I keep thinking of something long the lines of

int intensityValue = sender.titleLabel.text.intValue();

when it really is:

int intensityValue = [sender.titleLabel.text intValue];

No colon or indication of parameter, even empty parameter.

Gotta remember this.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.

%d bloggers like this: