05 2014 档案

摘要://1.调用通知进行回调方法//A控制器中- (void)toDo{ [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(test) name:@"testName" object:nil];}//... 阅读全文
posted @ 2014-05-24 22:52 2014_4_30 阅读(305) 评论(0) 推荐(0) 编辑
摘要://1.1获取在Xcode项目打开的情况下创建的Plist文件 NSString *path = [[NSBundle mainBundle]pathForResource:@"ProfessionClassify" ofType:@"plist"]; //1.2定义数组接收文件 NSMutabl... 阅读全文
posted @ 2014-05-23 23:12 2014_4_30 阅读(466) 评论(1) 推荐(0) 编辑
摘要:@interface ProfessionViewController (){ NSMutableArray *_professionArray;//cell模型数组 NSMutableArray *_selectArray; //已选中的cell数组}- (void)view... 阅读全文
posted @ 2014-05-23 22:59 2014_4_30 阅读(311) 评论(0) 推荐(0) 编辑
摘要://在viewDidLoad方法中创建Toolbartoolbar = [[UIView alloc] initWithFrame:CGRectMake(0, 0, 320, 66)];toolbar.backgroundColor = [UIColor redColor];//添加到tableVi... 阅读全文
posted @ 2014-05-22 22:27 2014_4_30 阅读(220) 评论(0) 推荐(0) 编辑
摘要:NSData *webData = [ @"{\"1\": {\"name\": \"Jerry\",\"age\": \"12\"}, \"2\": {\"name\": \"Bob\",\"age\": \"1... 阅读全文
posted @ 2014-05-16 13:59 2014_4_30 阅读(983) 评论(1) 推荐(0) 编辑
摘要://创建当前日期 NSDate *date = [NSDate date]; //创建日期格式类 NSDateFormatter *dateFormat = [[NSDateFormatter alloc]init]; //设置日期格式 [dateFormat ... 阅读全文
posted @ 2014-05-15 15:47 2014_4_30 阅读(788) 评论(0) 推荐(0) 编辑
摘要://创建UIBarButtonItemUIBarButtonItem * rightButton = [[UIBarButtonItem alloc]initWithBarButtonSystemItem:UIBarButtonSystemItemAdd target:self action:nil... 阅读全文
posted @ 2014-05-14 16:26 2014_4_30 阅读(182) 评论(0) 推荐(0) 编辑
摘要:for (int i = 0; i < 4; i++) {//4是按钮的个数 NSString *backImage = backgroud[i]; NSString *heightImage = heightBackground[i]; ... 阅读全文
posted @ 2014-05-07 17:53 2014_4_30 阅读(200) 评论(0) 推荐(0) 编辑
摘要://1.创建toolbar(MyToolbar继承UIToolbar) _myToolbar = [[MyToolbar alloc]initWithFrame:CGRectMake(kZero, kZero, kScreenW, kToolbarH)]; _myToolbar.ba... 阅读全文
posted @ 2014-05-07 11:48 2014_4_30 阅读(426) 评论(1) 推荐(0) 编辑
摘要:UITabBarItem *firstItem = [[UITabBarItem alloc]initWithTitle:@"测试" image:nil tag:11]; //设置字体颜色(后面设置字体状态)(UITextAttributeTextColor已过时) [firstItem ... 阅读全文
posted @ 2014-05-07 11:26 2014_4_30 阅读(1018) 评论(0) 推荐(0) 编辑
摘要:1 //设置圆形cornerRadius,是宽或高的一半 2 3 _imageView.layer.masksToBounds = YES; 4 5 6 7 CGFloat w = _imageView.frame.size.width / 2; 8 9 ... 阅读全文
posted @ 2014-05-04 06:54 2014_4_30 阅读(247) 评论(1) 推荐(0) 编辑
摘要:1 //UIAlertView的代理方法(创建UIAlertView之后,copy此代理方法即可) 2 3 - (BOOL)alertViewShouldEnableFirstOtherButton:(UIAlertView *)alertView{ 4 5 //1.取出输入框中的文字 ... 阅读全文
posted @ 2014-05-01 18:57 2014_4_30 阅读(274) 评论(0) 推荐(0) 编辑
摘要:1 - (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath{ 2 3 //1.取消选中这一行 4 5 [tableView deselectRowAtInde... 阅读全文
posted @ 2014-05-01 18:33 2014_4_30 阅读(282) 评论(0) 推荐(0) 编辑
摘要:1 2 3 //MyToolbar.h 头文件 4 @interface MyToolbar : UIToolbar 5 6 @end 7 8 //MyToolbar.m 实现文件 9 #import "MyToolbar.h"10 11 @implementation MyToolba... 阅读全文
posted @ 2014-05-01 18:22 2014_4_30 阅读(740) 评论(0) 推荐(0) 编辑
摘要:1 //1.创建toolbar左边的按钮,调用initWithTitle方法进行初始化2 3 // UIBarButtonItem *extend = [[UIBarButtonItemalloc]initWithTitle:@"扩展"style:UIBarButtonItemStylePlai... 阅读全文
posted @ 2014-05-01 18:14 2014_4_30 阅读(629) 评论(0) 推荐(0) 编辑

点击右上角即可分享
微信分享提示