Related Operations for Ios_tableview

Source: Internet
Author: User

"1" cancels the cell underline in TableView

Whether it is the original cell or the developer's custom cell, the table is underlined by default, canceling the cell's own underline

[Self.tableview Setseparatorstyle:uitableviewcellseparatorstylenone];

In general, the above code can be done, but I use the above code in the development process is still underlined, but also add a sentence

Set the underline color to be transparent, done

[Self.tableview Setseparatorcolor:[uicolor Clearcolor];

"2" Realization Click TableView Hide Keyboard

Add gestures to the UITableView.

UITapGestureRecognizer *gesturerecognizer = [[UITapGestureRecognizer alloc] initwithtarget:self action: @selector ( Hidekeyboard)];
Add gestures for TableView
[Self.tableview Addgesturerecognizer:gesturerecognizer];
Hide method is called when TableView is clicked

{
[Self.view Endediting:yes];
}

Related Operations for Ios_tableview

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.