Several pitfalls in iOS development and iOS development
1. When comparing NSString, do not use =. Use isdomaintostring: Method
2. Do not place the animation code in viewDidLoad, but in viewDidAppear.
3. After UIAlertView calls dismissWithClickedbuttonIndex, alertView: didDismissWithButtonIndex will be called by the proxy, while alertView: clickedButtonAtIndex will not be called
4. In the switch statement, if a variable is declared, use {} to enclose the case statement.
5. Use .png instead of. PNG .. PNG sometimes becomes invalid.
6. Do not assign non-integer coordinates to the UI object; otherwise, the image may be blurred.
7. Add @ 2x to the custom image name for the tab bar of the iPhone. Otherwise, the image size will be doubled.
8. Even if you use ARC, you should assign the delegate used to nil in view controller's dealloc method; otherwise, the program may crash.
9. Put the code for Gesture Recognition in viewDidAppear instead of viewDidLoad.
10. Do not operate auto layout in viewdidload, but in viewDidAppear.
11. When storyboard is used, the view controller init will not be called.
12. When the tableView: cellForRowAtIndexPath: Of UITableView is not called, there are two possible reasons: datasource is nil, and tableView: numberOfRowsInSection: Return 0.