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
A week ago, Coolpad quietly launched the Cool Pla...
New Year's Day Watch the flag-raising ceremon...
Today’s topic is how to write a promotion plan fo...
recently #A woman died after falling on her head ...
Opening remarks Every day, in every corner of the...
The list of "scientific" rumors for Mar...
Many friends have heard that thyroid surgery can ...
Periodontitis is the most common oral disease, so...
As the saying goes, "When spring thunder roa...
Tik Tok, all it lacks is some video material for ...
Office workers who don't have time to cook mu...
The screen size of ASUS ZenFone 6 is 6.0 inches, w...
According to European Automotive News, the Audi A...
Regulators take measures to regulate live broadca...
Today, let’s get to know Plain yarn single dress ...