摘要:
进入一个 UIViewController 会调用它的三个方法,分别是 viewDidLoad, viewWillAppear, viewDidAppear。如每个方法的名字一样,在不同的方法中要处理该处理的事情。之前的项目都是在 viewDidLoad 方法中初始化界面及数据源,现在看来这样做很不好,如果在这个方法中做了同步任务,那么只有能任务结束了才会显示界面,会有卡顿的感觉。所以,把数据的处理及请求写在 viewDidAppear 方法中是应该做的事。 阅读全文
摘要:
链接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 阅读全文
摘要:
用两个图片初始化两个CCSprite,一样的大小,重叠在一起,分别叫做 foregroundNode 和 backgroundNode。- (void)flipover{ if (isFliping) { return; } [self chooseCard];}-(... 阅读全文
摘要:
CCTexture2D* tex = [[CCTextureCache sharedTextureCache] addImage:@"new_image_name"];[spriteWant2Change setTexture: tex];what to do if texture is diffe... 阅读全文
摘要:
首先要下载一个服务:[下载地址]这是一个老外写的工作流,解压缩,然后双击,安装一下,选择xcode —> services —> services perference安装完就会在右边的菜单中的文本部分中看到Document Code 这个菜单然后点击左边菜单中的"添加应用程序快捷键"(Applications Shortcuts)点击加号,为这个新服务增加一个快捷键现在你可以在Xcode中使用新的快捷键了先选中需要注释的方法名,然后使用快捷键,就会发现方法名上面有注释了 阅读全文
摘要:
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 阅读全文