摘要: 1.属性传值和协议传值 1 #import "RootViewController.h" 2 #import "SecondViewController.h" 3 #warning 第四步:签订协议 4 @interface RootViewController ()<SecondViewContr 阅读全文
posted @ 2016-02-25 19:49 恒远也 阅读(231) 评论(0) 推荐(0) 编辑
摘要: 1 #import "ViewController.h" 2 3 int age = 18; 4 typedef int(^MaxBlock)(int,int); 5 @interface ViewController () 6 7 @end 8 9 @implementation ViewCont 阅读全文
posted @ 2016-02-25 19:39 恒远也 阅读(385) 评论(0) 推荐(0) 编辑
摘要: 2. 阅读全文
posted @ 2016-02-24 21:20 恒远也 阅读(316) 评论(0) 推荐(0) 编辑
摘要: 1 #import "ViewController.h" 2 #define WIDTH self.view.frame.size.width 3 #define HEIGHT self.view.frame.size.height 4 @interface ViewController ()<UI 阅读全文
posted @ 2016-01-29 21:33 恒远也 阅读(382) 评论(0) 推荐(0) 编辑
摘要: iOS开发UIScrollView使用详解一、ScrollView常用方法和属性@property(nonatomic)CGPoint contentOffset;设置滚动的偏移量@property(nonatomic)CGSize contentSize;设置滑动区域@property(nonat 阅读全文
posted @ 2016-01-29 10:51 恒远也 阅读(583) 评论(0) 推荐(0) 编辑
摘要: SegmentedControl又被称作分段控制器,是IOS开发中经常用到的一个UI控件。初始化方法:传入的数组可以是字符串也可以是UIImage对象的图片数组- (instancetype)initWithItems:(NSArray *)items;设置控件风格:@property(nonato 阅读全文
posted @ 2016-01-28 22:47 恒远也 阅读(226) 评论(0) 推荐(0) 编辑
摘要: 1 #import "ViewController.h" 2 3 @interface ViewController () 4 @property (strong,nonatomic) UIView *red; 5 @property (strong,nonatomic) UIView *blue; 阅读全文
posted @ 2016-01-28 22:41 恒远也 阅读(177) 评论(0) 推荐(0) 编辑
摘要: 1 #import "ViewController.h" 2 3 @interface ViewController () 4 5 @end 6 7 @implementation ViewController 8 9 - (void)viewDidLoad { 10 [super viewDidL 阅读全文
posted @ 2016-01-28 22:20 恒远也 阅读(179) 评论(0) 推荐(0) 编辑
摘要: UIslider滑块控件在IOS开发中会常用到,可用于调节音量,字体大小等UI方面的交互,用法总结如下:初始化一个滑块: UISlider * slider = [[UISlider alloc]initWithFrame:CGRectMake(0, 0, 100, 100)];设置滑块位置@pro 阅读全文
posted @ 2016-01-28 10:12 恒远也 阅读(140) 评论(0) 推荐(0) 编辑
摘要: 1.触摸事件 1 #import "ViewController.h" 2 @interface ViewController () 3 @property (strong,nonatomic) UILabel *simple; 4 @end 5 6 @implementation ViewCont 阅读全文
posted @ 2016-01-27 20:39 恒远也 阅读(221) 评论(0) 推荐(0) 编辑