摘要: UIViewController : NSObject视图控制器,管理UIViewMVC模式: Model-View-Controller(模型-视图-控制器)Delegate:范围小,具体实现某一个功能的时候使用实现代理的步骤:1.声明一个协议(本质上是声明接口,可以是多个),协议中的接口不实现2.被代理对象:定义一个成员变量,id delegate 同时实现delegate的getter和setter方法3.代理对象要遵循这个协议,并且协议的实现也在代理对象中自定义UIViewController@interface CustomUIViewController : UIViewContr 阅读全文
posted @ 2013-06-30 11:04 站在巨人肩膀上看巨人 阅读(335) 评论(0) 推荐(0)
摘要: UIView : NSObjectframe center boundsframe 相对于父视图center 相对于父视图 (CGPoint)point;bounds 相对于视图本身//设置view的center属性- (void)setCenter:(CGPoint)point;//设置view的center属性,会改变视图的frame- (void)insertSubview:(UIView *)view atIndex:(NSInteger)index;//在父视图上添加一个子视图,index为子视图在父视图上所处的位置,从0开始.- (void)exchangeSubviewAtInd 阅读全文
posted @ 2013-06-30 10:55 站在巨人肩膀上看巨人 阅读(279) 评论(0) 推荐(0)
摘要: 沙盒 : IOS给每一个App分配一定的独立的存储空间//获取沙盒路径NSString *path = NSHomeDirectory();如上图所示的文件夹,即为沙盒.沙盒空间彼此独立,数据私有异步:可以同时进行多个事件的进程(非阻塞).异步事件模型:程序无法知道用户何时出发应用的监听机制,用户一旦触发,应用立即做出响应.UIButton : (UIControl : UIView)+ (id)buttonWithType:(UIButtonType)buttonType;- (void)setFrame:(CGRect)rect;- (void)setTitle:(NSString )ti 阅读全文
posted @ 2013-06-30 10:52 站在巨人肩膀上看巨人 阅读(731) 评论(0) 推荐(0)
摘要: UIKit结构体系Bundle display name --—>修改应用名Target —>App Icons—> 单击 —>Select File 选择…-Info.plist 文件要负责保存应用程序的配置信息InfoPlist.strings 主要是让应用程序哆多语言支持,…-Prefixpch 全局头文件3张Default图片是开启应用程序时加载,适配设备main.m文件: UIApplicationMain(三个作用) 1.建立一个应用程序对象, 2.建立一个应用程序代理对象 3.启动事件循环,程序一直运行AppDelegate类:- (BOOL)applic 阅读全文
posted @ 2013-06-30 10:47 站在巨人肩膀上看巨人 阅读(605) 评论(0) 推荐(0)