码迷,mamicode.com
首页 >  
搜索关键字:_weak    ( 1256个结果
自定义tabBar控制器
一、控制器部分 #import "JRTabBarConroller.h" #import "JRTabBar.h" @interface JRTabBarConroller () @property(nonatomic,weak) UIViewController * currentVC; @end @implementation JRTabBarConrol...
分类:其他好文   时间:2015-07-07 23:00:36    阅读次数:187
Codeforces 61E Enemy is weak 乞讨i<j<k && a[i]>a[j]>a[k] 对数的 树阵
主题链接:点击打开链接意大利正在寻求称号 ia[j]>a[k] 的对数假设仅仅有2元组那就是求逆序数的做法三元组的话就用一个树状数组x表示 数字i前面有多少个比自己大的个数然后每次给这个y数组求和,再把x中>a[i]的个数存入y中就可以#include #include #include #incl...
分类:其他好文   时间:2015-07-07 16:36:51    阅读次数:118
swift中闭包 OC中Block 解决循环引用
OC 中 全局宏定义#define WS(weakSelf) __weak __typeof(&*self)weakSelf = self;用法如下:WS(weakself)[self.tableView addHeaderWithCallback:^{[weakself requestMember...
分类:编程语言   时间:2015-07-07 00:44:33    阅读次数:201
iOS中属性 (nonatomic, copy, strong, weak)的使用 By hL
以下内容来自Stackflow的详解1.Nonatomicnonatomic is used for multi threading purposes. If we have set the nonatomic attribute at the time of declaration, then a...
分类:移动开发   时间:2015-07-05 22:25:27    阅读次数:339
iOS开发小技巧之--WeakSelf宏的进化
我们都知道在防止如block的循环引用时,会使用__weak关键字做如下定义:__weak typeof(self) weakSelf = self;后来,为了方便,不用每次都要写这样一句固定代码,我们定义了宏:#define WeakSelf __weak typeof(self) weakSelf = self;之后,我们可以比较方便的在需要的地方:WeakSelf; ... [weakSelf...
分类:移动开发   时间:2015-07-03 12:25:31    阅读次数:279
物理仿真
1.捕捉@interfaceViewController ()//声明仿真器属性 保命啊@property(nonatomic,strong)UIDynamicAnimator *animator;@property (weak, nonatomic) IBOutlet UIImageView *i...
分类:其他好文   时间:2015-07-03 00:01:29    阅读次数:294
Socket 通讯
#import "ViewController.h"#import #import #import @interface ViewController ()@property (weak, nonatomic) IBOutlet UIWebView *webView;@property (nonat...
分类:其他好文   时间:2015-07-01 23:32:17    阅读次数:199
iOS masonry动态约束控件位置
#import "FourViewController.h" #import "View+MASAdditions.h" #import "FiveViewControllerr.h" #define WS(weakSelf)  __weak __typeof(&*self)weakSelf = self; #define SCREEN_WIDTH [UIScreen mainScreen...
分类:移动开发   时间:2015-07-01 12:25:27    阅读次数:202
Objective-C 内存管理之 _ARC
内存管理之 ARC 和 自动释放池一、ARC 中的变量所有权修饰符变量修饰符,主要用来标识对象的生命周期.在手动内存管理方式中没有这些概念. ARC 环境下变量所有权修饰符主要有以下几个: __strong __weak __unsa_unretained __autoreleasing详细说明: (1) 变量默认值都是__ strong 修饰 只要强引用存在,对象就不能释放.当超过了对...
分类:其他好文   时间:2015-06-30 22:05:09    阅读次数:165
[LintCode] Find the Weak Connected Component in the Directed Graph
Find the Weak Connected Component in the Directed GraphFind the number Weak Connected Component in the directed graph. Each node in the graph contains...
分类:其他好文   时间:2015-06-29 14:33:09    阅读次数:125
1256条   上一页 1 ... 92 93 94 95 96 ... 126 下一页
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!