摘要: Modal是除开UINavigationController和UITabBarController外一种比较自由的控制器推出方式,自下往上弹出一个控制器完全覆盖当前屏幕。 1.推出 //one控制器(当前控制器)点击jump需要跳转到新控制器two控制器- (IBAction)jump { // 展 阅读全文
posted @ 2016-02-02 16:57 欲眠 阅读(192) 评论(0) 推荐(0) 编辑
摘要: 一、初始化 - (IBAction)logout:(id)sender { UIActionSheet *sheet = [[UIActionSheet alloc] initWithTitle:@"确定要注销?" delegate:self cancelButtonTitle:@"取消" dest 阅读全文
posted @ 2016-02-02 15:45 欲眠 阅读(223) 评论(0) 推荐(0) 编辑
摘要: 一、UITextField通知(UITextField文本发生变化会调用通知) 初始化一个(连线)UITextField控件 @property (weak, nonatomic) IBOutlet UITextField *pwdField; 在viewDidLoad初始化通知 //注意name和 阅读全文
posted @ 2016-02-02 15:36 欲眠 阅读(740) 评论(0) 推荐(0) 编辑
摘要: // // AppDelegate.m #import "AppDelegate.h" @implementation AppDelegate /** * app加载完毕的时候调用(一般只调用一次) * */ - (BOOL)application:(UIApplication *)applicat 阅读全文
posted @ 2016-02-02 14:21 欲眠 阅读(421) 评论(0) 推荐(0) 编辑
摘要: 一、添加子控制器 UITabBarController添加控制器的方式有2种 添加单个子控制器 - (void)addChildViewController:(UIViewController *)childController;eg:[tabbarVc addChildViewController 阅读全文
posted @ 2016-02-02 13:49 欲眠 阅读(119) 评论(0) 推荐(0) 编辑
摘要: #import "ViewController.h" @interface OViewController () @property (nonatomic, strong) NSArray *apps; @property (nonatomic, strong) NSArray *persons; 阅读全文
posted @ 2016-01-30 11:32 欲眠 阅读(176) 评论(0) 推荐(0) 编辑
摘要: 一、初始化 // 1.创建导航控制器 OneViewController *one = [[OneViewController alloc] init]; // 2.创建nav的栈底控制器 UINavigationController *nav = [[UINavigationController 阅读全文
posted @ 2016-01-28 16:45 欲眠 阅读(169) 评论(0) 推荐(0) 编辑
摘要: /** * 通过一个frame来初始化一个UI控件 */ - (id)initWithFrame:(CGRect)frame; // YES:能够跟用户进行交互 @property(nonatomic,getter=isUserInteractionEnabled) BOOL userInterac 阅读全文
posted @ 2016-01-28 15:42 欲眠 阅读(145) 评论(0) 推荐(0) 编辑
摘要: 控制器常见的创建方式有以下几种 通过storyboard创建 直接创建 ViewController *md = [[ViewController alloc] init]; 指定xib文件来创建(创建控制器的时候加载这个YmView的xib) ViewController *md = [[View 阅读全文
posted @ 2016-01-28 09:39 欲眠 阅读(341) 评论(0) 推荐(0) 编辑
摘要: 阅读全文
posted @ 2016-01-27 14:34 欲眠 阅读(99) 评论(0) 推荐(0) 编辑