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" 阅读全文
posted @ 2013-09-23 13:07 荒唐爱情 阅读(346) 评论(0) 推荐(2)
摘要:通过使用IOS5自带解析类NSJSONSerialization方法解析JSON// //字典转json// NSDictionary *dict=[[NSMutableDictionary alloc] initWithObjectsAndKeys:@"pangran",@"name",@"male",@"sex",@"23",@"age" ,nil];// NSLog(@"%@",dict);// NSError *error;// NSData *j 阅读全文
posted @ 2013-09-23 12:03 荒唐爱情 阅读(1034) 评论(0) 推荐(1)
摘要: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 阅读全文
posted @ 2013-09-13 17:24 荒唐爱情 阅读(811) 评论(0) 推荐(0)
摘要:objective-c字符串连接,转换NSString* string; // 结果字符串NSString* string1, string2; //已存在的字符串1. string = [NSString initWithFormat:@"%@,%@", string1, string2 ];2. string = [string1 stringByAppendingString:string2];3 . string = [string stringByAppendingFormat:@"%@,%@",string1, string2];复制代码这三 阅读全文
posted @ 2013-09-11 15:53 荒唐爱情 阅读(232) 评论(0) 推荐(0)