Friday, August 6, 2010

Assigning NSString value to NSInteger variable

This is just a quick note, but I think it is useful. It took me a while, mostly because I was not choosing the right keyword while google-ing it.


// Your starting variables:
NSString *myString = 15;
NSInteger *myInteger;
int *myInt;

// Assigning NSString value
myInteger = [myString integerValue];
myInt = [myString intValue];

Hope it can help :).

Xem đầy đủ bài viết tại http://feedproxy.google.com/~r/ducban/~3/AK_-DOj6ZfA/915924945

No comments:

Post a Comment

Popular Posts