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
According to the National Space Administration on...
Your browser does not support the video tag Autho...
In less than a month, Apple's WWDC 2020 Globa...
Here, taking increasing the click volume of the of...
Last week, I submitted an article titled "Ho...
From 2015 to 2022, women have become the backbone...
Mid-Autumn Festival, one of China's four majo...
Among the third-party platforms we use, in additi...
Innovative OLEA U310 SoC simplifies motor technol...
The Internet has never been short of concepts. Fo...
When it comes to domestic compact SUVs priced aro...
On July 15, Apple's online store showed that ...
Although the domestic luxury car market is genera...
China's mobile financial Internet industry ha...
[[128462]] High energy warning ahead! The door to...