Combining his own practical development experience, he summarized 22 small tips for iOS development, and used a very cheerful tone to easily solve various difficult problems encountered in the development process. Just reading it makes you laugh. 1. What should I do if TableView does not display cells with no content? Similar to Figure 1, I don't want the blanks below to show up. It's very simple, add "self.tableView.tableFooterView = [[UIView alloc] init];" and it works. After adding this sentence, it becomes what Figure 2 looks like. 2. What should I do if the left swipe back gesture of the customized leftBarbuttonItem fails?
3. What should I do if ScrollView cannot be scrolled to the top in viewController for unknown reasons?
4. I am so annoyed writing keyboard events that I want to throw the keyboard. What should I do? Buy a solid keyboard; 5. Why is my app always not running smoothly? What’s the problem? As shown in the figure: This artifact is called: KMCGeigerCounter, go to GitHub and copy it. 6. How to adjust the position of separaLine without creating a new Cell?
7. How to close the keyboard by clicking on self.view? Do I need to add a tapGestures?
8. How to set a default background image for each ViewController? Use the base class, boy. 9. I want to change the layoutAttributes added in the xib in code, but how can I find it in code? Pull your constraints like you pull a Button, NSLayoutAttribute can also pull lines. 10. How to hide the navigationbar when scrolling like Safari?
11. The title of the back button on the navigation bar is so annoying, how can I make it disappear?
12. CoreData is annoying to use. What should I do if the syntax is long and boring? MagicRecord 13. How does CollectionView implement a hovering header like tableview? CSStickyHeaderFlowLayout 14. Can I use only one pan gesture to replace all directions of UISwipegesture?
15. How can I keep the image from being deformed when stretching it? Method 1:
Note: Some developers have reminded that this method has been deprecated and is now called resizableImageWithCapInsets. Method 2, as shown in the figure: 16. Why is there so much lag when playing GIF? Is there a better library? FLAnimatedImage by FlipBoard is perfect for you. 17. How to add pull-to-refresh in one sentence? Using SVPullToRefresh library:
18. How to change the color of the small check mark in the Cell in the tableview to another color?
19. Originally my statusbar was lightcontent, but using UIImagePickerController caused the style of my statusbar to turn black. What should I do?
20. How can I make my navigationbar transparent instead of blurry?
21. How to change the color and position of UITextField placeholder? Inherit UITextField and override this method:
22. Why do you know so many strange tricks? Go ask questions on Stack Overflow, boy! |
<<: Must read: Seven insights from 100 top APP developers
>>: Cook's attack is Apple's retreat
Every year on October 4th, World Animal Day is a ...
Produced by: Science Popularization China Author:...
On December 9, Umeng released its new data strate...
Facebook video ads are the most intuitive and eff...
At this year's SIGGRAPH 2014 World Conference...
Yesterday Topic #Chengdu will have rainfall for 3...
User portraits , as an effective tool for outlini...
Audit expert: Yuan Xiandao Deputy Chief Physician...
Osteoporosis is an invisible killer that can slow...
The latest season of " The Debaters " i...
The picture material comes from the Internet Mosq...
Author: Xue Qingxin, registered dietitian Reviewe...
Recently, several new people came to the company,...
For 2B companies, the importance of content marke...
[The Origin of New Year’s Day in China] September...