摘要: 当NSString为纯数字的时候可以用下面的方法://判断是否为整形:- (BOOL)isPureInt:(NSString*)string{ NSScanner* scan = [NSScanner scannerWithString:string]; intval; return[scanscanInt:&val] && [scanisAtEnd];} //判断是否为浮点形:- (BOOL)isPureFloat:(NSString*)string{ NSScanner* scan = [NSScanner scannerWithString:string];... 阅读全文
posted @ 2012-06-28 18:39 GreyWolf 阅读(207) 评论(0) 推荐(0) 编辑
摘要: AnNSScannerobject scans the characters of anNSStringobject, typically interpreting the characters and converting them into number and string values. You assign the scanner’s string on creation, and the scanner progresses through the characters of that string from beginning to end as you request item 阅读全文
posted @ 2012-06-28 18:10 GreyWolf 阅读(270) 评论(0) 推荐(0) 编辑
摘要: UILabel: "TheUILabelclass implements a read-only text view."UITextField: "AUITextFieldobject is a control that displays editable text and sends an action message to a target object when the user presses the return button."UITextView: "TheUITextViewclass implements the behavi 阅读全文
posted @ 2012-06-28 17:23 GreyWolf 阅读(177) 评论(0) 推荐(0) 编辑