摘要:这是一篇xcode单元测试入门的文章。有空了给各位翻出来方便大家看。This is a post by iOS Tutorial Team member Unit testing is great because it makes your life easier. Easier to deliver high quality code, and easier to make changes without fear of breaking something! But what might not be so easy is getting started if you’r...
阅读全文
摘要:n the first part of this tutorial, we set up a pair of simple views in Interface Builder that we switched between modally. In this tutorial, we’ll make them somewhat useful and pass data between them using delegates. The concept of protocols and delegates is an important and somewhat complex...
阅读全文
摘要:In your iPhone app, you’ll probably be spending most of the time pushing new view controllers to the stack in order to show screen flow. Sometimes, though, you just want to popup a screen for quick display or input. Here’s a quick demo/tutorial on the different standard modal views offered b...
阅读全文
摘要:Add a UIWebView programmatically without using a .xib file. This goes in the views controller. Original from http://www.gibsontang.com/?p=176 (Big thanks man!) - (void) initUIWebView { NSLog(@”DetailViewController->initUIWebView {“); UIWebView *aWebView; // init and create the UIWebView aWeb...
阅读全文
摘要:imageNamed is evil So a little while back we wrote about the confusing crashes on the device that we eventually figured out were caused by [UIImage imageNamed:] running out of memory when it tried to cache lots of big images. So we apparently solved the problem by making a thumbnail-sized im...
阅读全文