- 博客(7)
- 收藏
- 关注
转载 Stream 编程模式
stream编程模式提供了与 unix 的文件操作类似的模式。首先创建和设置流,接着打开流,然后读写流,在流存在时还可以通过查询流的相关属性来读取流的相关信息,在流使用完毕后关闭流。 iOS 为stream编程模式提供的api编程接口包括两大类,一类是Core Foundation框架层用C语言实现的CFStream API(包括CFStream、 CFReadStream
2015-05-13 14:54:38 1519
转载 4种多线程
1. NSThread 1>类方法 detachNewThreadSelector 直接启动线程,调用选择器方法 2>成员方法 initWithTarget 需要使用start方法,才能启动实例化出来的线程 优点:简单 缺点: *控制线程的生命周期比较困难 *
2015-05-04 15:58:47 425
原创 沙盒
沙盒根目录:NSString*home = NSHomeDirectory();利用沙盒根目录拼接”Documents”字符串NSString *home = NSHomeDirectory();NSString*documents=[home stringByAppendingPathComponent:@"Documents"]; //创建文件_filepath=[do
2015-05-04 15:19:43 347
转载 UITabBarController的使用方法 UINavigationController的使用方法
HomeViewController.m- (id)initWithNibName:(NSString *)nibNameOrNil bundle:(NSBundle *)nibBundleOrNil{ self = [superinitWithNibName:nibNameOrNil bundle:nibBundleOrNil]; if (self)
2015-04-09 20:32:17 313
转载 设备旋转
- (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation //已经相当弱化 - (NSUInteger)application:(UIApplication *)application supportedInterfaceOrientationsForWin
2015-04-09 12:53:32 402
原创 mvc与视图控制器作用分 uiviewcontroller的生命周期
架构模式 (控制器Controller)-负责转发请求,对请求进行处理。当点击视图中按钮时将视图进行已编写好当算法进行一定运作。 (视图View) -界面设计人员进行图形界面设计。 @interface ViewController :UIViewController - (IBAction)run:(id)sender;- (IBAction)rese
2015-04-09 12:46:05 373
原创 基本控件
, #import"ViewController.h" @interfaceViewController () @end @implementationViewController - (void)viewDidLoad { [super viewDidLoad]; // Do any additional setup after loa
2015-04-07 11:00:04 341
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人