判断NSString是NSInteger还是float?
摘要:
方法很多,无意间在Stack Overflow到此方法特此标记:就是用NSNumber处理 NSNumber* n = //from somewhere if(strcmp([n objCType],@encode(float))==0) { NSLog(@"this is a float"); }else if(strcmp([n objCType],@encode(int))==0) { NSLog(@"this is an int"); } 阅读全文
posted @ 2013-02-23 17:22 黯夜曦 阅读(230) 评论(0) 推荐(0) 编辑