2014年8月7日
摘要: iOS 8 和 OS X 10.10 中一个被强调了多次的主题就是大一统,Apple 希望通过 Hand-off 和各种体验的无缝切换和集成将用户黏在由 Apple 设备构成的生态圈中。而对开发者而言,今年除了 Swift 的一个大主题也是平台的统一。在 What's New in Cocoa To... 阅读全文
posted @ 2014-08-07 23:00 ZiCheng 阅读(214) 评论(0) 推荐(0) 编辑
摘要: 详解IOS开发应用之并发Dispatch Queues是本文哟啊介绍的内容,我们几乎可以调度队列去完成所有用线程来完成的任务。调度队列相对于线程代码更简单,易于使用,更高效。下面讲主要简述调度队列,在应用中如何使用调度队列去执行任务。1、关于调度队列所有的调度队列都是先进先出队列,因此,队列中的任务... 阅读全文
posted @ 2014-08-07 22:55 ZiCheng 阅读(232) 评论(0) 推荐(0) 编辑
摘要: Grand Central Dispatch (GCD)是Apple开发的一个多核编程的解决方法。dispatch queue分成以下三种:1)运行在主线程的Main queue,通过dispatch_get_main_queue获取。/*!* @function dispatch_get_main... 阅读全文
posted @ 2014-08-07 22:48 ZiCheng 阅读(174) 评论(0) 推荐(0) 编辑
摘要: 1.建立tableView DataTable = [[UITableView alloc] initWithFrame:CGRectMake(0, 0, 320, 420)]; [DataTable setDelegate:self]; [DataTable setDataSource:self]... 阅读全文
posted @ 2014-08-07 22:39 ZiCheng 阅读(591) 评论(0) 推荐(0) 编辑
摘要: UITapGestureRecognizer * tap = [[UITapGestureRecognizer alloc] initWithTarget:self action:@selector(tapOnce)];//定义一个手势[tap setNumberOfTouchesRequired:... 阅读全文
posted @ 2014-08-07 21:01 ZiCheng 阅读(142) 评论(0) 推荐(0) 编辑
摘要: - (BOOL)textField:(UITextField *)textField shouldChangeCharactersInRange:(NSRange)range replacementString:(NSString *)string;{ //string就是此时输入的那个字符tex... 阅读全文
posted @ 2014-08-07 20:55 ZiCheng 阅读(417) 评论(0) 推荐(0) 编辑
摘要: #import [self.content.layer setBackgroundColor:[[UIColor whiteColor] CGColor]]; [self.content.layer setBorderColor:[[UIColor grayColor] CGColor]]; ... 阅读全文
posted @ 2014-08-07 20:51 ZiCheng 阅读(745) 评论(0) 推荐(0) 编辑
摘要: 中国天气weather.comhttp://m.weather.com.cn/data/101110101.html(六天预报)http://www.weather.com.cn/data/sk/101110101.html(实时天气信息)其中101110101是城市的代码,获得城市代码进入http... 阅读全文
posted @ 2014-08-07 20:47 ZiCheng 阅读(630) 评论(0) 推荐(0) 编辑
摘要: UIImage 图像-IOS开发 (实例)UIKit中有一些类可以用来操纵单个图像,还有一个图像类可以用来显示图像。Apple还提供了一种特殊的导航控制器,用于从图像库中选择图像。UIImage类对图像及其底层数据进行封装。它可以直接绘制在一个视图内,或者作为一个图像容器在另一个更大的图像视图容器中... 阅读全文
posted @ 2014-08-07 14:49 ZiCheng 阅读(633) 评论(0) 推荐(0) 编辑
摘要: 1.// 创建读取的文件操作柄 NSFileHandle *inFile=[NSFileHandle fileHandleForReadingAtPath:@"/Users/haiyefeng/Desktop/text1.txt"]; if(inFile==nil) ... 阅读全文
posted @ 2014-08-07 13:56 ZiCheng 阅读(141) 评论(0) 推荐(0) 编辑
摘要: 1.superview获得自己的父控件对象@property(nonatomic,readonly)UIView *superview2.subviews获得自己的所有子控件对象@property(nonatomic,readonly,copy)NSArray *subviews; int c... 阅读全文
posted @ 2014-08-07 13:49 ZiCheng 阅读(183) 评论(0) 推荐(0) 编辑
摘要: 1.文件目录操作 // 1.创建文件操作对象fm,并打印出当前目录 NSFileManager *fm=[NSFileManager defaultManager]; // 获取当前目录 NSLog(@"当前目录:%@",[fm curren... 阅读全文
posted @ 2014-08-07 10:11 ZiCheng 阅读(195) 评论(0) 推荐(0) 编辑
摘要: // 创建文件操作对象 fm NSFileManager *fm=[NSFileManager defaultManager]; //将文件内容读取到内存缓冲区 NSString *fPathName=@"/Users/hai... 阅读全文
posted @ 2014-08-07 10:05 ZiCheng 阅读(164) 评论(0) 推荐(0) 编辑
摘要: NSFileManager文件操作:-(NSData*) contentsAtPath: path从一个文件中读取数据-(bool)createFileAtPath:path contents:(NSData *)data attributes:attr创建一个文件并写入数据-(BOOL) remo... 阅读全文
posted @ 2014-08-07 10:01 ZiCheng 阅读(231) 评论(0) 推荐(0) 编辑
摘要: 【UIKit】AppDelegate:在应用程序启动完毕后调用(只会调用一次,第一次打开程序的时候才会调用)// 视图加载完成,应用程序加载到内存后调用的方法- (BOOL)application:(UIApplication *)application didFinishLaunchingWith... 阅读全文
posted @ 2014-08-07 09:41 ZiCheng 阅读(213) 评论(0) 推荐(0) 编辑
摘要: 【UITableView】: 阅读全文
posted @ 2014-08-07 09:16 ZiCheng 阅读(132) 评论(0) 推荐(0) 编辑
摘要: 【自定义Cell2】.全部通过代码添加:【1】:设置Cell 1):创建一个MsgCell类 继承UITableViewCell .h中声明2个属性一个是用户头像,另外一个是发表的文字@property (nonatomic,weak,readonly) UIImageView *iconVie... 阅读全文
posted @ 2014-08-07 09:12 ZiCheng 阅读(151) 评论(0) 推荐(0) 编辑
摘要: #pragma mark - 解决iOS7状态栏问题- (void)viewWillAppear:(BOOL)animated{ // 注意点:自定义布局方法必须放在隐藏或显示导航栏(如果有的话)这句话后面,不然会乱; self.navigationController.navigati... 阅读全文
posted @ 2014-08-07 08:58 ZiCheng 阅读(256) 评论(0) 推荐(0) 编辑
摘要: 【Tabbar】【下面的tab栏】【第一步】:创建一个Tabbed Application 【第二步】:加入图片素材。【第三步】:创建3个有xib的类文件FirstViewController,SecondViewController,ThirdViewController。 【第四... 阅读全文
posted @ 2014-08-07 08:54 ZiCheng 阅读(310) 评论(0) 推荐(0) 编辑