摘要: UITouch触摸事件 主要为三个方法 1.-(void)touchesBegan:(NSSet *)touches withEvent:(UIEvent *)event{2.3. UITouch *touch = [touches anyObject];4. CGPoint point = [to 阅读全文
posted @ 2016-02-22 22:16 Emerys 阅读(424) 评论(0) 推荐(0)
摘要: UIGestureRecognizer 1.#import "ViewController.h"2.3.@interface ViewController ()<UIGestureRecognizerDelegate>4.{5. UIImageView *imageView ;6. NSIntege 阅读全文
posted @ 2016-02-22 21:43 Emerys 阅读(302) 评论(0) 推荐(0)
摘要: UISegmentControl 、UIStepper UISegmentControl 1. UISegmentedControl *segmentControl = [[UISegmentedControl alloc] initWithItems:@[@"1",@"2",@"3",@"4"]] 阅读全文
posted @ 2016-02-22 20:44 Emerys 阅读(278) 评论(0) 推荐(0)
摘要: UINavigationController navigationBar和toolBar是归属于navigationController的,但是上面的item是每个控制器自己的。 1. self.title = @"设置";2.3. self.navigationController.toolbar 阅读全文
posted @ 2016-02-21 22:40 Emerys 阅读(247) 评论(0) 推荐(0)
摘要: 控制器之间反向传值 委托(代理) 首先我们定下一个协议protocol 1. #import <Foundation/Foundation.h>2.3. @protocol ChangeText <NSObject>4.5. -(void)changeText:(NSString *)str;6. 阅读全文
posted @ 2016-02-21 21:21 Emerys 阅读(206) 评论(0) 推荐(0)
摘要: 工厂模式 1.2.#import <UIKit/UIKit.h>3.4.@interface LXYUIFactory : NSObject5.6./**创建Window*/7.+ (UIWindow *)createWindow;8.9./**创建一个试图控制器*/10.+ (UIViewCont 阅读全文
posted @ 2016-02-17 10:48 Emerys 阅读(170) 评论(0) 推荐(0)
摘要: UITabBarController 1.- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions {2. // Override poin 阅读全文
posted @ 2016-02-17 10:35 Emerys 阅读(216) 评论(0) 推荐(0)
摘要: UITabBarController自定义二之xib 新建一个xib文件 在UITabBarController的子类方法viewDidLoad方法中加载xib 1.-(void)viewDidLoad{2. [super viewDidLoad];3. self.tabBar.hidden = Y 阅读全文
posted @ 2016-02-16 16:47 Emerys 阅读(476) 评论(0) 推荐(0)
摘要: UITabBarController自定义一 首先在Appdelegate.m文件中将UITabBarController的子类设置为rootViewController,并设置其viewControllers 1.- (BOOL)application:(UIApplication *)appli 阅读全文
posted @ 2016-02-16 16:13 Emerys 阅读(225) 评论(0) 推荐(0)
摘要: UISlider常用属性1.@property(nonatomic) float value; // default 0.0. this value will be pinned to min/max2.@property(nonato... 阅读全文
posted @ 2016-01-08 20:27 Emerys 阅读(273) 评论(0) 推荐(0)