iphone NSString int date 等转换
//将int转换成NSString
NSString* s = [NSString stringWithFormat:@"%i", i];
//将NSString转换成int
[nsstring intValue];
//将NSDate转换成NSString
NSDateFormatter *dateFormatter = [[NSDateFormatter alloc]init];
[dateFormatter setDateFormat:@"yyyy-MM-dd HH:mm:ss"];
NSString*strDate = [dateFormatterstringFromDate:_loginResult.dateLastLogin];
_label.text= strDate;
[dateFormatter release];
摘自 进阶码农的专栏
补充:移动开发 , IOS ,