摘要:
PrefaceI don’t normally post highly technical stuff to my blog, but here’s an exception that I hope will benefit the Mac and iOS (iPhone & iPad) developer community. So if you’re not part of that, feel free to skip it.IntroductionThis article is a cumulative list of the most commonly-violated be 阅读全文
posted @ 2013-06-08 18:15
ygm900
阅读(258)
评论(0)
推荐(0)
摘要:
在进行开发时,最常遇到的就是相同的功能,会在不同的地方用到。用 .Net 开发的话,就会将程序包装成 dll,直接在要使用的项目上加入参考即可。在开发 iOS 其实也是有方法可以做到的下面的步骤,会先建立一个 Cocoa Touch Static Library 的项目建立 Static Library,然后再建立一个 Single View Application 的项目来使用建立好的 Library 来进行测试步骤如下:一、建立Cocoa Touch Static Library项目1. 开启 Xcode ,选择 Framework & Library,建立一个 Cocoa Tou 阅读全文
posted @ 2013-06-08 17:59
ygm900
阅读(1728)
评论(0)
推荐(0)
摘要:
在iOS开发中,为了节约时间,程序员经常会用全局变量代替属性。但是这样做,尤其是新手开发中,经常会引起内存泄露的报错,其实作为苹果自己也没有给出一个完美安全的内存管理代码例子。但是在iOS开发到如今,有一个相对比较安全的内存管理模版。 - (void)viewDidLoad { [super viewDidLoad]; // Do any additional setup after loading the view, typically from a nib. CGRect fram=[UIScreen mainScreen].bounds; UIView *... 阅读全文
posted @ 2013-06-08 17:55
ygm900
阅读(1853)
评论(0)
推荐(0)
浙公网安备 33010602011771号