Convert NSString to int

1 NSString *aNumberString = @"123" ;
2 int i = [aNumberString intValue];

 

Convert int to NSString

1 int aNumber = 123;
2 NSString *aString = [ NSString stringWithFormat: @"%d" , aNumber];

Leave a Reply

电子邮件地址不会被公开。 必填项已用*标注