1. Why should I set a variable release to nil to a variable release? The Memory pointed to by this variable is released, but the variable itself remains unchanged and still points to the original memory address. If this variable is accessed after it is released, or it is repeatedly release, the application will crash. If it is set to nil, this variable points to 0 × 00, which ensures that the program will not be able to access the original memory address in the future, and there is no problem with the nil release. 2. When using class members, there is no difference in adding self. The member itself is called without self. The get set Method of the member is actually called after adding self. Example ://. h @ property (nonatomic, retain) NSString * name //. m name = @ "bang" // NSString * str = self will be released at any time without retain. name // equals NSString * str = [self name]; self. name = @ "bang" // equals to [self setName: @ "bang"]; at this time, the string is retained in the set method. 3. for memory leakage, you can use the xcode compilation tool Product-Analyze to check possible leakage points within the function block range (some possible errors will be prompted for the out-of-band ). The leak search method monitored by leaks is to track the variables that appear in the Code prompts. This variable is often leaked outside the prompt call stack. If it cannot be found, the final method is to rewrite the retain and release methods of this variable. debug, from the call stack, shows who retain it and no release. Note that the variables generated with CFXXCreate (for example, CFArrayCreate) must be released with CFRelease. 4. If no search is required for data storage, You Can serialize a data object and save it to sqlite. This function is used for deserialization. Serialization requires the data class to implement the NSCoding protocol and encodeWithCoder and initWithCoder methods. If there are multiple data objects, you can write a base class to implement these two methods, in this case, we use reflection to enumerate all our variables to encode and decode. Once and for all, we can find them online. 5. the UINavigationController header and tail display is hidden. When using NavigationController to manage the push and pop views, you must set whether to display NavigationBar and ToolBar based on different view settings, as a result, if the NavigationBar and ToolBar are not displayed, it is displayed on viewWillAppear. Don't laugh at me. I didn't understand the whole process well and never found out. -(Void) viewWillAppear :( BOOL) animated {[super viewWillAppear: animated]; [self. navigationController setToolbarHidden: NO]; [self. navigationController setNavigationBarHidden: NO];} 6. the mechanism of UITableView cursor-based tableView rendering is probably: Set the total number of rows first. When a row is rolled into the view range, a function is called back to get the view and display it. This row will continue to be called back when the view is rolled back. This mechanism means that no matter how much data in your table is, you can put all the data into the table without paging, because you do not need to retrieve all the data at once, you only need to retrieve the corresponding data based on the cursor when you need to display it. This may be a natural way for APP components, but the data and elements on the web page must be loaded into the memory at a time. After a long time, the web did not expect such an implementation mechanism at first, as a result, we have taken many detours. 7. UIWebView: The rendering range of UIWebView is determined not by the visual range, but by the frame size of its control. I tried to embed webview in tableview. In order to make the webview and tableview scroll together, set the webview size to the content size in webview, so that webview does not display the scroll bar, this can be rolled along with the scroll bar of tableview. The consequence of this is that every time a webview renders the entire page at a time, the memory usage is very poor, and when the webview is zoomed in and out, the rendering of the whole page is more difficult, performance that is intolerable. The solution is to set the height of webview to the height of the iphone of the whole screen, which limits the visible rendering range of webview each time and improves the performance. The problem is that you cannot scroll with tableview, but you can optimize the experience in other ways. Recently, ZAKER of the new version is also doing the same.