How to convert an NSString into an integer

Imagine you had an NSString and wanted to save it as an integer value.
You can use the intValue method for that:

To do the reverse, you can use the initWithFormat method:

Leave a Reply

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