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
WeChat 8.0 has been a hot topic these days, espec...
According to the latest research of the "Chi...
[[131966]] A netizen asked on Quora: How can I tr...
What is optimization? Optimization is to take cer...
: : : : : : : : : : : : : : :...
Teasing Siri has become an indispensable source o...
Author: Xue Qingxin, registered dietitian Reviewe...
It is no use having a good website that just look...
【Today’s cover】 On December 25, in the Huangshaya...
At the age of 14, he was admitted to the Junior C...
A Mayu optimization expert who has invested tens ...
We all know that "targeting" is the bas...
Death may seem like a pure loss, but if we zoom o...
A few days ago, Yidao released a set of posters w...
It's been really cold these days! We all feel...