Learning iOS Development UI Chapter--ui Knowledge points Summary (iv) Uitabelview/uitableviewcell

Source: Internet
Author: User

Uitabelview: Common Properties

@property (nonatomic) cgfloat rowHeight; Would return the default value if unset

@property (nonatomic) cgfloat sectionheaderheight; Would return the default value if unset

@property (nonatomic) cgfloat sectionfooterheight; Would return the default value if unset

@property (Nonatomic, ReadWrite, retain) UIView *backgroundview

UITableView: Common methods

-(void) reloaddata;

-(ID) Dequeuereusablecellwithidentifier: (NSString *) identifier;

-(ID) Dequeuereusableheaderfooterviewwithidentifier: (NSString *) identifier

UITableView: Data Source method

- (Nsinteger) TableView: (UITableView *) TableView numberofrowsinsection: (nsinteger) section;

-(UITableViewCell *) TableView: (UITableView *) TableView Cellforrowatindexpath: (Nsindexpath *) Indexpath;

-(Nsinteger) Numberofsectionsintableview: (UITableView *) TableView;

-(NSString *) TableView: (UITableView *) TableView titleforheaderinsection: (nsinteger) Section; Fixed font style. Use Custom view (UILabel) If you want something different

-(NSString *) TableView: (UITableView *) TableView titleforfooterinsection: (nsinteger) Section;

UITableView: Proxy method

-(CGFloat) TableView: (UITableView *) TableView Heightforrowatindexpath: (Nsindexpath *) Indexpath;

-(CGFloat) TableView: (UITableView *) TableView heightforheaderinsection: (nsinteger) Section;

-(CGFloat) TableView: (UITableView *) TableView heightforfooterinsection: (nsinteger) Section;

-(UIView *) TableView: (UITableView *) TableView viewforheaderinsection: (nsinteger) Section; Custom view for header. Would be adjusted to default or specified header height

-(UIView *) TableView: (UITableView *) TableView viewforfooterinsection: (nsinteger) Section; Custom view for footer. Would be adjusted to default or specified footer height

UITableViewCell: Properties

@property (Nonatomic, ReadOnly, retain) Uiimageview *imageview Ns_available_ios (3_0);  Default is nil. (These three properties are in the default style)

@property (nonatomic, readonly, retain) UILabel *textlabel Ns_available_ios   (3_0); //default is nil.

@property (Nonatomic, ReadOnly, retain) UILabel *detailtextlabel Ns_available_ios (3_0);  Default is nil. Label'll is created if necessary (and the current style supports a detail label).

UITableViewCell: Method

-(ID) Initwithstyle: (Uitableviewcellstyle) style Reuseidentifier: (NSString *) reuseidentifie

The state of Uitableviewcellstyle

Uitableviewcellstyledefault,//Simple cell with text label and optional image view (behavior of UITABLEVIEWCE ll in Iphoneos 2.x)

UITableViewCellStyleValue1,//left aligned label in left and right aligned label on right with blue text D in Settings)

UITableViewCellStyleValue2,//Right aligned label on left with blue text and left aligned label D in Phone/contacts)

uitableviewcellstylesubtitle//left aligned label on top and left aligned label on bottom with gray text D in IPod).

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.