07 2015 档案

摘要:UIStoryboard *s = [UIStoryboard storyboardWithName:storyboard的名字 bundle:nil]; id viewController(所属的视图控制器) = [s instantiateViewControllerWithIdentifier 阅读全文
posted @ 2015-07-14 11:11 谢小锋 阅读(215) 评论(0) 推荐(0)
摘要:#import <Foundation/Foundation.h>@interface user : NSObject<NSCoding>@property(nonatomic,copy)NSString* name;@property(nonatomic,copy)NSString* age;@e 阅读全文
posted @ 2015-07-13 10:51 谢小锋 阅读(177) 评论(0) 推荐(0)
摘要:const,只读的全局变量,其值不可修改.static,规定此全局变量只在当前模块(文件)中可见.static const,既是只读的,又是只在当前模块中可见的. int a=12; const int * p; 阅读全文
posted @ 2015-07-09 10:13 谢小锋 阅读(155) 评论(0) 推荐(0)
摘要:#import "ViewController.h"#import #import #import "CustomView.h"#define width self.view.frame.size.width//#define height self.view.frame.size.height@i... 阅读全文
posted @ 2015-07-08 15:52 谢小锋 阅读(181) 评论(0) 推荐(0)
摘要:是启动页停留一段时间 只需要在 AppDelegate - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions {// Override 阅读全文
posted @ 2015-07-07 15:33 谢小锋 阅读(564) 评论(0) 推荐(0)
摘要:OC中protocol、category和继承的区别以前还是有点迷糊,面试的时候说的有点混乱,现在结合一些资料总结一下。利用继承,多态是一个很好的保持“对扩展开放、对更改封闭”(OCP)的办法,也是最常见的一种方法。Objective C还支持另外两种语法来支持OCP:Protocol和Catego... 阅读全文
posted @ 2015-07-05 08:45 谢小锋 阅读(899) 评论(0) 推荐(0)