iOS Programming Recipe 6: Creating a custom UIView using a Nib JANUARY 7, 2013 BY MIKETT 12 COMMENTS Creating a custom UIView using a Nib Assumptions You are familiar with creating UIView subclasses, and instantiating UIView’s both from a Nib file or…
iOS Programming Subclassing UITableViewCell  1.Creating BNRItemCell UITableViewCell is a UIView subclass. UITableViewCell是UIView的子类. When subclassing UIView (or any of its subclasses), you often override its drawRect: method to customize the view's a…
iOS Programming State Restoration 状态存储 If iOS ever needs more memory and your application is in the background, Apple might kill it to return memory to the system. 如果iOS 需要更多的memory,你的应用在后台,apple 可能杀死它来得到更多的内存给系统. This should be transparent to your u…
iOS Programming  Auto Layout: Programmatic Constraints  1.  However, if your views are created in code, then you will need to constrain them programmatically. 如果你的view是由代码创建的,那么你需要用编程限制它了. To have a view to work with, you are going to recreate the im…
iOS Programming Introduction to Auto Layout   自动布局 A single application that runs natively on both the iPad and the iPhone is called a universal application. 一个原生的能运行在iPad 和iPhone 的应用叫做universal application  Then select the Homepwner target in the pr…
iOS Programming Touch Events and UIResponder  1 Touch Events  As a subclass of UIResponder, a UIView can override four methods to handle the four distinct touch events: 作为UIResponder的一个子类,UIView可以重写四个方法来处理touch events. (1) a finger or fingers touches…
iOS Programming Camera  2  1.1 Creating BNRImageStore The image store will fetch and cache the images as they are needed. It will also be able to flush the cache if the device runs low on memory.   Create a new NSObject subclass called BNRImageStore.…
iOS Programming UINavigationController the Settings application has multiple related screens of information: a list of settings (like Sounds), a detailed page for each setting, and a selection page for each detail. This type of interface is called a…
iOS Programming Editing UITableView 1.1 Editing mode  UITableView has an editing property, and when this property is set to YES, the UITableView enters editing mode. UITableVIew有一个editing property,当属性设置为YES时,UITableView设置为editing mode. Depending on h…
iOS programming UITabBarController 1.1 View controllers become more interesting when the user's actions can cause another view controller to be presented. 当用户的action 能导致其他view controller 展现,view controller将会变得更有趣. UITabBarController keeps an array of…