目前分類:基本概念 (21)
- Jun 21 Fri 2013 13:36
genstrings across 多元路徑 Localizable
- Dec 26 Wed 2012 09:17
在兩個不同的 Class 之間傳遞參數的方法
from http://furnacedigital.blogspot.tw/2012/07/class.html
在兩個不同的 Class 之間傳遞參數的方法
- Dec 26 Wed 2012 09:13
Key-Value Coding(KVC)一
- Dec 10 Mon 2012 12:05
C Gossip: malloc()、free()、calloc() 與 realloc()
C Gossip: malloc()、free()、calloc() 與 realloc()
from http://caterpillar.onlyfun.net/Gossip/CGossip/MallocFree.html
到目前為止,您都是事先宣告好所要使用的變數,當程式開始執行時,這些變數就會自動被配置記憶體空間。 |
- Dec 03 Mon 2012 15:07
Objective-C 的 Nil、nil 與 NULL
- Nov 24 Sat 2012 17:14
initWithNibName 和 loadNibNamed 的区别
initWithNibName 和 loadNibNamed 的区别
from http://www.cnblogs.com/ghj1976/archive/2012/05/28/2521840.html- Nov 24 Sat 2012 14:47
[objective C] UIEdgeInsetsMake 拉伸操作的部分的大小
[objective C] UIEdgeInsetsMake 拉伸操作的部分的大小
UIEdgeInsetsMake(0,0,0,0)指定了不進行拉伸操作的部分的大小,顺序是上、左、下、右4个边。
- Nov 23 Fri 2012 17:43
UIImageJPEGRepresentation和UIImagePNGRepresentation
UIImageJPEGRepresentation和UIImagePNGRepresentation
from http://www.helmsmansoft.com/index.php/archives/1706
在Iphone上有两种读取图片数据的简单方法: UIImageJPEGRepresentation和UIImagePNGRepresentation.
UIImageJPEGRepresentation函数需要两个参数:图片的引用和压缩系数.而UIImagePNGRepresentation只需要图片引用作为参数.通过在实际使用过程中,比较发现: UIImagePNGRepresentation(UIImage* image) 要比UIImageJPEGRepresentation(UIImage* image, 1.0) 返回的图片数据量大很多.譬如,同样是读取摄像头拍摄的同样景色的照片, UIImagePNGRepresentation()返回的数据量大小为199K ,而 UIImageJPEGRepresentation(UIImage* image, 1.0)返回的数据量大小只为140KB,比前者少了50多KB.如果对图片的清晰度要求不高,还可以通过设置 UIImageJPEGRepresentation函数的第二个参数,大幅度降低图片数据量.譬如,刚才拍摄的图片, 通过调用UIImageJPEGRepresentation(UIImage* image, 1.0)读取数据时,返回的数据大小为140KB,但更改压缩系数后,通过调用UIImageJPEGRepresentation(UIImage* image, 0.5)读取数据时,返回的数据大小只有11KB多,大大压缩了图片的数据量 ,而且从视角角度看,图片的质量并没有明显的降低.因此,在读取图片数据内容时,建议优先使用UIImageJPEGRepresentation,并可根据自己的实际使用场景,设置压缩系数,进一步降低图片数据量大小.
- Nov 19 Mon 2012 16:10
didSelectRowAtIndexPath event not triggered when select row programaticaly
didSelectRowAtIndexPath event not triggered when select row programaticaly
t is working as documented:
- Nov 16 Fri 2012 14:09
OBJECTIVE C NULL定義
- Nov 10 Sat 2012 17:33
storyboard和xib不同的人生道路
- Nov 10 Sat 2012 14:16
UITableViewCell的selecte与deselect
UITableViewCell的selecte与deselect
from http://longtimenoc.com/archives/uitableviewcell%E7%9A%84selecte%E4%B8%8Edeselect
- Nov 05 Mon 2012 14:16
NSPredicate及正则的一点使用
- Nov 05 Mon 2012 14:01
NSPredicate的用法
NSPredicate的用法
一般来说这种情况还是蛮多的,比如你从文件中读入了一个array1,然后想把程序中的一个array2中符合array1中内容的元素过滤出来。
正 常傻瓜一点就是两个for循环,一个一个进行比较,这样效率不高,而且代码也不好看。
其实一个循环或者无需循环就可以搞定了,那就需要用搞 NSPredicate这个类了~膜拜此类~
- Nov 05 Mon 2012 10:52
NSBundle的用法
NSBundle的用法
from http://fecbob.pixnet.net/blog/post/36157949-nsbundle%E7%9A%84%E7%94%A8%E6%B3%95--
NSBundle的物件可以獲取應用程式安裝目錄的附件。
- Sep 21 Fri 2012 10:06
Singletons in Objective-C
Singletons in Objective-C
from http://www.galloway.me.uk/tutorials/singleton-classes/
One of my most used design patterns when developing for iOS is the singleton pattern. It’s an extremely powerful way to share data between different parts of code without having to pass the data around manually. More about the singleton pattern and other patterns can be found in this excellent book:
- Sep 13 Thu 2012 10:25
初探ARC - Automatic Reference Counting
初探ARC - Automatic Reference Counting
今天颱風天
- Aug 23 Thu 2012 08:50
OBjectC筆記 -- @property 和 @synthersize
OBjectC筆記 -- @property 和 @synthersize
- Aug 18 Sat 2012 09:14
NSArray與NSMutableArray與NSMutableDictionary