The weird tricks of iOS development

Source: Internet
Author: User

1. What if the TableView does not display a cell with no content? Similar to Figure 1, I don't want to let those empty displays below. Very simple, add "Self.tableView.tableFooterView = [[UIView alloc] init];" Tried to say yes, and after that, it became

2. What do I do if I customize the Leftbarbuttonitem left slide return gesture to fail?  Self.navigationItem.leftBarButtonItem = [[Uibarbuttonitem alloc] initwithimage:img style:uibarbuttonitemstyleplain   Target:self Action: @selector (Onback:)]; Self.navigationController.interactivePopGestureRecognizer.delegate = (id) self;

3. ScrollView inexplicable can't viewcontroller to the top of the row? Self.automaticallyadjustsscrollviewinsets = NO;

4. Keyboard event Write well irritable, all want to fall keyboard what to do?  Buy a sturdy keyboard, use Iqkeyboardmanager (searchable on GitHub), and don't hurt your legs when you're done. 5. Why my app is always not fluent, this artifact is called: Kmcgeigercounter, go to GitHub to carry it.

6. How to adjust the position of separaline without creating a new cell? _mytableview.separatorinset = Uiedgeinsetsmake (0, 100, 0, 0);

7. How to click Self.view to let the keyboard, need to add a tapgestures?  -(void) Touchesbegan: (Nsset ) touches withevent: (uievent ) event {[Self.view endediting:yes]; }

8. How to set the default background image for each viewcontroller? Use the base class Ah, juvenile.

9. Want to change in the code to add the Layoutattributes in the Xib, but how to use the code to find? Pull the button like pull your restraint, Nslayoutattribute also can pull the line.  10. How to hide navigationbar when sliding like safari? Navigationcontroller.hidesbarsonswipe = Yes

11. Navigation bar Return key The title of the belt is too annoying, how to let it disappear? [[Uibarbuttonitem appearance] Setbackbuttontitlepositionadjustment:uioffsetmake (0, -60) forbarmetrics: Uibarmetricsdefault];

CoreData used to be very annoying, grammar and smelly and long how to do? Magicrecord

How does CollectionView implement TableView's hover header? Csstickyheaderflowlayout

The weird tricks of iOS development

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.