码迷,mamicode.com
首页 >  
搜索关键字:__weak    ( 1256个结果
IOS第11天(1:UIPickerView点餐)
UIPickerView#import "ViewController.h"@interface ViewController ()@property (nonatomic,strong)NSArray *foods;@property (weak, nonatomic) IBOutlet UILa...
分类:移动开发   时间:2015-08-19 16:09:24    阅读次数:121
IOS 图片播放案例
#import "ViewController.h"@interface ViewController ()@property (weak,nonatomic) IBOutlet UIImageView *tupianView;@end@implementation ViewController-(...
分类:移动开发   时间:2015-08-18 16:15:10    阅读次数:142
IOS绘图
#import "ViewController.h"#import "DrawView.h"@interface ViewController ()@property (weak, nonatomic) IBOutlet UIImageView *imageView;- (IBAction)doTo...
分类:移动开发   时间:2015-08-18 14:03:16    阅读次数:209
IOS UITableview 的Cell 封装
感觉不错的代码。收藏下。 #import "GDBookTableViewCell.h" #import "GDBook.h" @interface GDBookTableViewCell () @property (weak, nonatomic) IBOutlet UIImageView *iconLabel; @property (weak, nonatomic) IBOutlet U...
分类:移动开发   时间:2015-08-18 11:53:01    阅读次数:141
iOS开发-assign、retain、copy、strong、weak的区别
对于初学的开发者,对于assign、retain、copy、strong、weak的用法及意义可能不是很明白,我对于这个问题也研究了很久,在篇博文,巧巧代码,让我们来瞧瞧吧! 先定义一个Student类: #import @interface Student : NSObject @property (nonatomic, copy) NSString *name; @end 然后先是mrc...
分类:移动开发   时间:2015-08-16 00:38:47    阅读次数:268
iOS 代理为啥要用weak修饰? (刨根问底一)
在开发中我们经常使用代理,或自己写个代理,而代理属性都用weak(assign)修饰,看过有些开发者用strong(retain),但并没发现有何不妥,也不清楚weak(assign)与strong(retain)修饰有何区别功能实现就行了,考虑这么多干嘛~~~我只能哈哈哈 weak:指明该对象并不负责保持delegate这个对象,delegate这个对象的销毁由外部控制 @property (no...
分类:移动开发   时间:2015-08-15 10:23:44    阅读次数:158
IOS中的tableView刷新和加载数据的技巧
WEAK_SELF(vc);              [self.tableView addLegendFooterWithRefreshingBlock:^{             vc.pageIndex++;             [vc httpRequestWithPageIndex:vc.pageIndex];         }];              [s...
分类:移动开发   时间:2015-08-12 09:02:46    阅读次数:352
PAT 1042. Shuffling Machine (20)
1042. Shuffling Machine (20)Shuffling is a procedure used to randomize a deck of playing cards. Because standard shuffling techniques are seen as weak...
分类:系统相关   时间:2015-08-11 15:52:48    阅读次数:164
C/C++知识要点5——智能指针原理及自定义实现
智能指针概述: 智能指针用来管理动态对象。其行为类似于常规指针,重要的区别是:它负责自动释放所指向的对象。 C++ 11标准库提供两种智能指针:shared_ptr、unique_ptr 区别是:shared_ptr允许多个指针指向同一个对象;unique_ptr则独占所指向的对象。 另外,还有一种weak_ptr的伴随类,它是一种弱引用,指向shared_ptr所管理的对象。 ...
分类:编程语言   时间:2015-08-10 12:07:49    阅读次数:232
OC基础-@property后的修饰符及其用法小结
1.@property后的修饰符strong : 该属性值对应 __strong 关键字,即该属性所声明的变量将成为对象的持有者,等同于"retain"weak : 该属性对应 __weak 关键字,与 __weak 定义的变量一致,该属性所声明的变量将没有对象的所有权,并且当对象被释放之后,对象将...
分类:其他好文   时间:2015-08-08 17:57:46    阅读次数:453
1256条   上一页 1 ... 84 85 86 87 88 ... 126 下一页
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!