09 2013 档案
摘要:个人笔记,高手绕道普通方法解析xml:.h文件@property (nonatomic,strong) NSMutableArray *itemData;@property(nonatomic,assign)NSString *currentTagName;.m文件注意@synthesize上面的属性- (void)getxml{ NSString *xmlPath=[[NSString alloc] init]; xmlPath=[[NSBundle mainBundle] pathForResource:@"student" ofType:@"xml"
阅读全文
摘要:通过使用IOS5自带解析类NSJSONSerialization方法解析JSON// //字典转json// NSDictionary *dict=[[NSMutableDictionary alloc] initWithObjectsAndKeys:@"pangran",@"name",@"male",@"sex",@"23",@"age" ,nil];// NSLog(@"%@",dict);// NSError *error;// NSData *j
阅读全文
摘要:UIButton *button = [[UIButton alloc] initWithFrame:CGRectMake(0,0,60,31)];[button setBackgroundImage:[UIImage imageNamed:@"abc.png"] forState:UIControlStateNormal];UIBarButtonItem *btn = [[UIBarButtonItem alloc] initWithCustomView:button];self.navigationItem.rightBarButtonItem = btn;[butto
阅读全文
摘要:objective-c字符串连接,转换NSString* string; // 结果字符串NSString* string1, string2; //已存在的字符串1. string = [NSString initWithFormat:@"%@,%@", string1, string2 ];2. string = [string1 stringByAppendingString:string2];3 . string = [string stringByAppendingFormat:@"%@,%@",string1, string2];复制代码这三
阅读全文

浙公网安备 33010602011771号