弱引用实在是太弱了,连通过该引用来申请空间都无法保持联系。举个例子@interface classA:NSObject@porperty (nonatomic,weak) classA * tempClass1;@property (nonatomic,strong) classA * tempCl...
分类:
其他好文 时间:
2015-12-21 14:02:40
阅读次数:
177
循环引用的简单理解:A引用B,B又引用A,双方都同时保持对方的一个引用,导致任何时候引用计数都不为0,始终无法释放。一:Block1.ARC环境下: 使用__weak声明一个代替self的新变量代替原先的self;2.MRC环境下:使用__block .二:代理ARC环境下:声明代理时使用弱引用we...
分类:
移动开发 时间:
2015-12-21 10:48:05
阅读次数:
134
UIViewContrller 有三种创建方式:1.通过alloc init直接创建。2.通过故事版创建。3.通过xib文件描述。这是appDelegate.m的内容 //window的颜色是绿色 self.window = [[UIWindow alloc]initWithFrame:[U...
分类:
其他好文 时间:
2015-12-19 20:29:51
阅读次数:
229
UIKit框架UIResponder–UIApplication–UIView?UIWindow,UILabel,UIImageView,UIPickerViewUIAlertView,UIScrollVIew,UIProgressView,UIToolbar,UIWebView?UIControl...
分类:
其他好文 时间:
2015-12-18 18:55:11
阅读次数:
293
1 视图的分类控件。继承自UIControl类,能够响应用户高级事件。窗口。它是UIWindow对象。一个iOS应用只有一个UIWindow对象,它是所有子视图的“根”容器。容器视图。它包括UIScrollView。UIToolBar以及它们的子类。UIScrollView的子类有UITextVie...
分类:
其他好文 时间:
2015-12-17 15:38:20
阅读次数:
251
该UIResponder类定义了响应和处理事件的对象接口。它是UIView和UIApplication的超类(UIWindow)。这些类的实例有时被称为响应者对象,简单地说就是响应者。 通常有2种事件类型,触摸事件和移动事件。 处理触摸事件的主要方法 1.touchesBegan:with...
分类:
其他好文 时间:
2015-12-17 01:50:54
阅读次数:
407
一: 效果图效果描述:点击空白处快速回收键盘 二: 工程图三:代码区AppDelegate.h#import @interface AppDelegate : UIResponder @property (retain, nonatomic) UIWindow *window;@endAppDele...
分类:
其他好文 时间:
2015-12-16 17:18:02
阅读次数:
214
一,效果图。二,工程图。三,代码。AppDelegate.h#import @interface AppDelegate : UIResponder @property (strong, nonatomic) UIWindow *window;@endAppDelegate.m#import "Ap...
分类:
其他好文 时间:
2015-12-15 10:19:52
阅读次数:
155
// AppDelegate的相关介绍// IOS笔记//@interface AppDelegate : UIResponder //@property (strong, nonatomic) UIWindow *window;AppDelegate可处理的事件包括:1> 应用程序的生命周期事件(...
分类:
其他好文 时间:
2015-12-14 18:54:14
阅读次数:
117
self.window = [[UIWindow alloc]initWithFrame:[UIScreen mainScreen].bounds]; ViewController * vc =[[ViewController alloc]init]; self.window.rootVie...
分类:
其他好文 时间:
2015-12-11 18:13:56
阅读次数:
155