2011年7月9日

摘要: 1. 删掉多余的文件。 2. 把png图片转换成jpg格式。png支持透明,但对于哪些没有透明的图片,png格式几乎是jpg格式大小的两倍。把非透明的png转成jpg会有立竿见影的效果。 3. 对于universal程序,iPad可以使用iPhone 4的@2x图片,当然需要在设计上做出平衡。 阅读全文
posted @ 2011-07-09 13:23 VinceOniPhone 阅读(1251) 评论(0) 推荐(0) 编辑

2011年6月28日

摘要: #import <QuartzCore/QuartzCore.h> [self.view.layer removeAllAnimations]; 阅读全文
posted @ 2011-06-28 20:10 VinceOniPhone 阅读(3289) 评论(1) 推荐(0) 编辑

2011年6月2日

摘要: http://stackoverflow.com/questions/1238838/uiimagepickercontroller-and-extracting-exif-data-from-existing-photos 阅读全文
posted @ 2011-06-02 20:14 VinceOniPhone 阅读(405) 评论(0) 推荐(0) 编辑

2011年5月19日

摘要: http://stackoverflow.com/questions/150446/how-do-i-detect-when-someone-shakes-an-iphone 我的实现(基于Eran Talmor): 没必要application.applicationSupportsShakeToEdit = YES; Set the applicationSupportsShakeToEdit... 阅读全文
posted @ 2011-05-19 13:58 VinceOniPhone 阅读(2060) 评论(0) 推荐(0) 编辑

2011年4月11日

摘要: 在Xcode4中增加一个framework的步骤: 1. 在Project navigator中点击当前project。 2. 在project editor中,点击一个target。 3. 选择'Build Phases' tab。 4. 展开'Link Binary With Libraries' 5. 点击'+'按钮,增加一个framework。 6. 回到Project navigator... 阅读全文
posted @ 2011-04-11 23:29 VinceOniPhone 阅读(1273) 评论(0) 推荐(0) 编辑

2011年4月8日

摘要: GCD 概述 1. GCD 包含于 libSystem.dylib 2. 可供所有程序使用. - #include <dispatch/dispatch.h> 3. GCD API 提供 block-based and function-based variants - 目前仅提供 block-based API GCD总结 1. Blocks - dispatch_async() 2. Queu... 阅读全文
posted @ 2011-04-08 12:49 VinceOniPhone 阅读(2338) 评论(2) 推荐(0) 编辑

2011年4月7日

摘要: Grand Central Dispatch 使用GCD,可以让你的程序不会失去响应. 多线程不容易使用,用了GCD,会让它变得简单。你无需专门进行线程管理, 很棒! 让你的程序保持响应的原则: 1. 不要柱塞主线程 2. 把工作一到其他线程中做。 3. 做完后更新主线程的UI. 没有GCD的代码: - (void)addTweetWithMsg:(NSString*)msg url:(NSURL... 阅读全文
posted @ 2011-04-07 15:35 VinceOniPhone 阅读(8905) 评论(0) 推荐(0) 编辑

2011年4月6日

摘要: Blocks和Grand Central Dispatch已经被iOS4支持,(Snow Leopard早就支持了). 程序运行架构 Blocks Blacks are available in C++ and Objective-C++. Basic Blocks 我们在block中使用这个字符^ 因为这个字符很特别,在C++中不能作为操作符重载. Block 词法 ^ [返回类型][参数] {... 阅读全文
posted @ 2011-04-06 16:03 VinceOniPhone 阅读(1459) 评论(0) 推荐(0) 编辑
摘要: 这个session涵盖: Xcode 4中的Clang(Code completion, Fix-it, Indexing and Edit-all-in-scope), Clients of LLVM(LLDB, Integrated assembler). 在Xcode4中使用Clang 很多内容已在Session 312中提到。仅仅增加了一些例子。 LLDB的好处 Higher fideli... 阅读全文
posted @ 2011-04-06 10:13 VinceOniPhone 阅读(855) 评论(0) 推荐(0) 编辑

2011年4月5日

摘要: LLVM(Low Level Virtual Machine)是新的compiler环境,用C++编写。LLVM project在University of Illinois at Urbana-Champaign大学的Vikram Adve和Chris Lattner的领导下,开始于2000年。当时,Lattner作为助教和硕士生刚刚加入此大学。后来在2005年,Lattner受雇于Apple。... 阅读全文
posted @ 2011-04-05 20:29 VinceOniPhone 阅读(992) 评论(0) 推荐(0) 编辑

导航