網頁

2012年5月31日 星期四

NSString to int


实现方法
NSString *string = …;
int value = [string intValue];
还可以通过floatValue或者doubleValue进行转换。
NSString *textSelectedIndex = [[NSString alloc] initWithFormat: @"%d",selectedIndex];

沒有留言:

張貼留言

注意:只有此網誌的成員可以留言。