上一页 1 ··· 5 6 7 8 9 10 11 12 13 14 下一页
摘要: 进入一个 UIViewController 会调用它的三个方法,分别是 viewDidLoad, viewWillAppear, viewDidAppear。如每个方法的名字一样,在不同的方法中要处理该处理的事情。之前的项目都是在 viewDidLoad 方法中初始化界面及数据源,现在看来这样做很不好,如果在这个方法中做了同步任务,那么只有能任务结束了才会显示界面,会有卡顿的感觉。所以,把数据的处理及请求写在 viewDidAppear 方法中是应该做的事。 阅读全文
posted @ 2013-12-11 14:19 有妄想症的猫zz 阅读(1523) 评论(0) 推荐(0) 编辑
摘要: 链接Q:I used to be able to type with my real mac keyboard after launching the iPhone Simulator. Typing with the on-screen simulator keyboard is just horrible when testing with large amounts of text.No matter what I do, I can't get my keyboard to type anymore inside the simulator. Even if I have &q 阅读全文
posted @ 2013-12-10 15:34 有妄想症的猫zz 阅读(5051) 评论(0) 推荐(0) 编辑
摘要: 用两个图片初始化两个CCSprite,一样的大小,重叠在一起,分别叫做 foregroundNode 和 backgroundNode。- (void)flipover{ if (isFliping) { return; } [self chooseCard];}-(... 阅读全文
posted @ 2013-12-05 16:52 有妄想症的猫zz 阅读(3247) 评论(0) 推荐(0) 编辑
摘要: CCTexture2D* tex = [[CCTextureCache sharedTextureCache] addImage:@"new_image_name"];[spriteWant2Change setTexture: tex];what to do if texture is diffe... 阅读全文
posted @ 2013-12-05 16:47 有妄想症的猫zz 阅读(315) 评论(0) 推荐(0) 编辑
摘要: 首先要下载一个服务:[下载地址]这是一个老外写的工作流,解压缩,然后双击,安装一下,选择xcode —> services —> services perference安装完就会在右边的菜单中的文本部分中看到Document Code 这个菜单然后点击左边菜单中的"添加应用程序快捷键"(Applications Shortcuts)点击加号,为这个新服务增加一个快捷键现在你可以在Xcode中使用新的快捷键了先选中需要注释的方法名,然后使用快捷键,就会发现方法名上面有注释了 阅读全文
posted @ 2013-12-05 16:24 有妄想症的猫zz 阅读(728) 评论(0) 推荐(0) 编辑
摘要: You need to escape the non-ASCII characters in your hardcoded URL as well://localisationName is a arbitrary string hereNSString* webName =[localisationName stringByAddingPercentEscapesUsingEncoding:NSUTF8StringEncoding];NSString* stringURL =[NSString stringWithFormat:@"http://maps.google.com/ma 阅读全文
posted @ 2013-12-02 17:08 有妄想症的猫zz 阅读(1291) 评论(0) 推荐(0) 编辑
摘要: #import #import @interface UIView (Shape)- (void)setShape:(CGPathRef)shape;@end#import "UIView+Shape.h"@implementation UIView (Shape)- (void)setShape:(CGPathRef)shape{ if (shape == nil) { self.layer.mask = nil; } CAShapeLayer* maskLayer = [CAShapeLayer layer]; maskLayer.path =... 阅读全文
posted @ 2013-11-29 10:41 有妄想症的猫zz 阅读(4477) 评论(0) 推荐(0) 编辑
摘要: iOS: 解决某些第三方库因为ARC不能使用的问题1、在target下面的build phases下有一个compile source,下面有很多待编译文件。可以看到一个compile flag,可以针对某些文件进行arc设置。这样,某些框架不能使用的问题不就解决了嘛。于是,在要用到的框架包含的所有.m文件后对应的compile flag处加上-fno-objc-arc,这样,就能成功在ios5项目下运行了。2、将库打包成frameworkhttp://blog.csdn.net/dean19900504/article/details/7921015http://www.cocoachina 阅读全文
posted @ 2013-11-27 17:57 有妄想症的猫zz 阅读(2306) 评论(0) 推荐(0) 编辑
摘要: UITableView 顶部能够放大的图片现在有挺多的应用在 UITableView 顶部加入图片,通过拖拽 UITableView 来实现图片的放大。对比一下腾讯出品的两款AppQQ:可展示更多的图片,向下滑动TableView,顶部的图片可以展示更多的内容,而不是局限于默认状态下可展示的默认大小。 再来看看微信的朋友圈:固定的大小,向下拖动TableView后,顶部露出了背景图片。 两种实现方式,各有各的好处。微信的效果是默认的,即什么都不用设置。这种状态下,我们可以在背景图上做文章,加个Logo之类的都可以。QQ的实现方式是我比较喜欢的,对于不需要下拉刷新的页面,又不想分配太大的空间.. 阅读全文
posted @ 2013-11-27 17:39 有妄想症的猫zz 阅读(4968) 评论(0) 推荐(1) 编辑
摘要: 转自: Post by Steve VlaminckMy good friend google told me that using a custom font in iOS is “easy”. And for the most part it is, but I got tripped up in a few places.I happen to have Apples Keychain example code lying around so I’ll be using that in this example. I am also using Xcode 4.5 and focusin 阅读全文
posted @ 2013-11-26 17:00 有妄想症的猫zz 阅读(2205) 评论(0) 推荐(0) 编辑
上一页 1 ··· 5 6 7 8 9 10 11 12 13 14 下一页