IOS UITableView Bottom Add button

Source: Internet
Author: User

A requirement effect

To achieve the effect, add the Submit button at the bottom of the UITableView.

Can be achieved by UITableView Tablefooterview

Accessory View below content. Default is nil. Not to is confused with section footer@property (nonatomic, retain) UIView *tablefooterview;



Two-code implementation
-  (void) viewdidload{    [super viewdidload];         //1. Add Bottom button     [self addfooterbutton];} /** *   Add bottom button  */-(void) addfooterbutton{    //1. Initialize button     UIButton *button = [UIButton buttonWithType:UIButtonTypeRoundedRect];         //2. Setting text and text colors     [button settitle:@ "complete diagnostics"  forState:UIControlStateNormal];    [button setTitleColor:[UIColor  Whitecolor] forstate:uicontrolstatenormal];        //3. Setting fillet amplitude     button.layer.cornerRadius = 10.0;     Button.layer.borderwidth = 1.0;        //4. Setting frame     button.frame = cgrectmake (0, 100, 20, 44); &nBSP;       //5. Setting the background color     button.backgroundcolor =  GREENCOLOR;        //6. Setting trigger events     //ellipsis          //7. Adding to Tableview tablefooterview      Self.tableview.tablefooterview = button;}


Three


IOS UITableView Bottom Add button

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.