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
Under the background of the new normal of the eco...
Today, Tencent has finally taken this step, that ...
1. What is a short video script? A short video sc...
[[121176]] How big is the market value of mobile ...
Copywriting is just a result. If you want to know...
Image source: Qiantu.com If air enters the blood ...
Many product designers are obsessed with the use ...
From the earliest example of Perfect Diary to Hua...
In order to compete for limited orbital resources...
In the era of mobile Internet, online life is bec...
1. Background Store promotion will start on Novem...
Do you still remember the day you registered your...
Industrial AI (AI), the application of artificial...
There are new ideas every year, but this year the...