码迷,mamicode.com
首页 >  
搜索关键字:__weak    ( 1256个结果
ios-uitableviewcell展开
#import @interface ZSDHelpCell : UITableViewCell@property (weak, nonatomic) IBOutlet UIImageView *selectImageView;@property(nonatomic,copy)NSString *q...
分类:移动开发   时间:2014-12-04 11:29:49    阅读次数:140
IOS抽屉效果功能实现
抽屉效果功能实现 一、.h文件 @interfaceHMDrawViewController:UIViewController@property(nonatomic,weak,readonly)UIView*mainView;@property(nonatomic,weak,readonly)UIView*leftView;@property(nonatomic,weak,readonly)UIView*rightView;@end 二、.m文件 @in..
分类:移动开发   时间:2014-12-03 02:00:45    阅读次数:281
动作和输出口 IBAction IBOutlet
#import @interface ViewController : UITableViewController@property (weak, nonatomic) IBOutlet UILabel *Label1;- (IBAction)onClick:(id)sender;@end为了将事件...
分类:其他好文   时间:2014-12-02 20:36:08    阅读次数:185
@property的属性weak nonatomic strong等介绍(ios)
学习ios也已经快半个月了,也尝试做简单的应用程序,但是遇到很多问题,总结下来就是:急于求成,总想着做一个东西出来,里面的东西也不懂,只知道把这个复制到代码中就OK了,现在发现基础很重要,所以在此总结一下最基本的经常接触的weak nonatomic strong等功能:   @property @synthesize关键字 注意:这两个关键字是编译器特性,让xcode可以自动生...
分类:移动开发   时间:2014-12-02 19:18:32    阅读次数:259
[Swift]Day15:闭包中的循环强引用
闭包中的循环强引用解决闭包和类实例之间的循环强引用可以通过定义捕获列表来实现。捕获列表捕获列表中的每个元素都是由weak或者unowned关键字和实例的引用(如self)成对组成。每一对都在方括号中,通过逗号分开:lazy var someClosure: (Int, String) -> String = { [unowned self] (index: Int, stringToPro...
分类:编程语言   时间:2014-12-02 00:12:08    阅读次数:320
[Swift]Day14:自动引用计数
自动引用计数先陪妹子看电影,贴点代码占个坑。弱引用可以在前面加上 weak 表明这是一个弱引用。弱引用不会保持住引用的实例,并且不会阻止 ARC 销毁被引用的实例。可以看下下面这个例子中如何通过弱引用避免循环引用的问题:class Person { let name: String var apartment: Apartment? init(name: String) ...
分类:编程语言   时间:2014-11-30 21:30:22    阅读次数:227
用ios做的一个简单的记事本
#import "ViewController.h"@interface ViewController ()@property (weak, nonatomic) IBOutlet UITextField *标题; //用的是一个text按键@property (weak, nonatomic) I...
分类:移动开发   时间:2014-11-29 17:35:12    阅读次数:454
ios 做的一个三个数求平均数 最大数 最小数
#import "ViewController.h"@interface ViewController ()@property (weak, nonatomic) IBOutlet UITextField *one;//能够输入的第一个文本文框 用的是text按键@property (weak, n...
分类:移动开发   时间:2014-11-29 17:30:43    阅读次数:710
ARC中的strong 与 weak
1.> __strong 和 __weakPerson.h#import @class Dog;@interface Person : NSObject{ __strong Dog *_dog; //__weak Dog *_dog;}- (Dog *)dog;- (void)setDog:(...
分类:其他好文   时间:2014-11-27 16:02:11    阅读次数:166
SharedPtrControlBlock
template class shared_ptr;template class weak_ptr;// This class is an internal implementation detail for shared_ptr.class SharedPtrControlBlock {tem.....
分类:其他好文   时间:2014-11-25 23:16:19    阅读次数:207
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!