1 #import "ViewController.h" 2 3 @interface ViewController ()<UITableViewDataSource,UITableViewDelegate> 4 /** 5 * 存储数据的数组 6 */ 7 @property(nonatomic,
分类:
其他好文 时间:
2016-03-01 22:18:52
阅读次数:
250
一属性的内存管理 1属性的语义特征 ①assign 基本数据类型(char,short,int,float,double) <1>最开始使用的set get方法的实现 @property (nonatomic, assign) NSIntger age; set - (void)setName:(N
分类:
其他好文 时间:
2016-03-01 20:49:00
阅读次数:
229
键盘类 #import <Foundation/Foundation.h> @interface Keyboard : NSObject @property(strong,nonatomic)NSString *brand; @end #import "Keyboard.h" @implementa
分类:
其他好文 时间:
2016-03-01 20:36:26
阅读次数:
325
表格控制器UITableViewController是UIViewController的子类控制器中包含一个UITableView视图属性:@property(nonatomic,retain)UITableView*tableViewUITableViewController遵循UITableView的数据源协议、代理协议并且属性tableView的数据源、代理均被设置为控制器。表格视图的..
分类:
其他好文 时间:
2016-03-01 19:22:05
阅读次数:
239
strong weak strong与weak是由ARC新引入的对象变量属性 ARC引入了新的对象的新生命周期限定,即零弱引用。如果零弱引用指向的对象被deallocated的话,零弱引用的对象会被自动设置为nil。 @property(strong) MyClass *myObject; 相当于@
分类:
其他好文 时间:
2016-03-01 19:04:08
阅读次数:
249
//UIView+CornerRadius.h @interface UIView (CornerRadius) @property (nonatomic, assign) IBInspectable CGFloat cornerRadius; @end //UIView+CornerRadius.
分类:
其他好文 时间:
2016-03-01 17:14:19
阅读次数:
168
#import "ViewController.h" @interface ViewController () @property(strong, nonatomic) NSTimer *timer; @end @implementation ViewController - (void)viewD
分类:
其他好文 时间:
2016-03-01 14:33:06
阅读次数:
127
第一章:代码无错就是优-简单的工厂模式 先建立一个计算类Operation Operation.h文件 @interface Operation : NSObject @property(nonatomic,assign)double numberA; @property(nonatomic,ass
分类:
其他好文 时间:
2016-03-01 12:52:59
阅读次数:
223
查了不少资料,都不太全,自己查看了apple文档,写了一份代码: 如下(只是界面): 1. 声明属性 @property (nonatomic, strong) UISearchController *searchController; 2. 调用方法: [self searchController
分类:
移动开发 时间:
2016-03-01 10:53:20
阅读次数:
203
1 #import "RootViewController.h" 2 3 @interface RootViewController ()<UITableViewDataSource,UITableViewDelegate> 4 @property(nonatomic,strong)NSArray
分类:
其他好文 时间:
2016-02-29 21:42:48
阅读次数:
272