UITableView Basic article

Source: Internet
Author: User
Tags split

Property:

RowHeight: Row Height

Sectionheaderheight: Height of Table head

Sectionfooterheight: Footer Height

Estimatedrowheight: Assessment Height (iOS7)

Estimatedsectionheaderheight: Estimated header height (iOS7)

Estimatedsectionfooterheight: Estimated footer height (iOS7)

Separatorinset: Split Line Setup (IOS7)

Backgroundview: Background View

Numberofsections: How many parts of the table are included

Visiblecells: Displayed cell (value is Nsarray)

Indexpathsforvisiblerows: The index of the Visible cell (value is Nsarray)

Editing: whether to allow editing

Allowsselection: Whether to allow selection

Allowsselectionduringediting: Whether you can select in edit state

Allowsmultipleselection: Whether to allow multiple selections

Allowsmultipleselectionduringediting: Whether to allow multiple selections in edit state

Indexpathforselectedrow: Index of the selected cell (single)

Indexpathsforselectedrows: The index of the selected cell (single or multiple values are Nsarray)

Sectionindexminimumdisplayrowcount: Sets the table header index (value Nsinteger) when the header has a number of

Sectionindexcolor: The text color of a selected cell

Sectionindexbackgroundcolor: The background color of a selected cell (iOS7)

Sectionindextrackingbackgroundcolor: Selects the persistent background color of a section's cells

Separatorstyle: Split Line Form (Uitableviewcellseparatorstylenone,uitableviewcellseparatorstylesingleline, uitableviewcellseparatorstylesinglelineetched)

Separatorcolor: Split Line Color

Separatoreffect: Split Line effect (iOS 8)

Celllayoutmarginsfollowreadablewidth: Whether to leave the style line content white (iOS9 to add primarily for ipad)

Tableheaderview: Table Header View

Tablefooterview: Footer View

Rememberslastfocusedindexpath:.

Method:

-(Instancetype) initWithFrame: (CGRect) Frame style: (Uitableviewstyle) style; Initialize method set table mode simultaneously

-(void) reloaddata; Refresh Data

-(void) Reloadsectionindextitles; Refresh Index

-(Nsinteger) Numberofrowsinsection: (nsinteger) section; Gets how many rows in a group

-(CGRect) Rectforsection: (nsinteger) section; Get the location size of a lease

-(CGRect) Rectforheaderinsection: (nsinteger) section; Gets the position size of the header
-(CGRect) Rectforfooterinsection: (nsinteger) section; Gets the position size of the footer
-(CGRect) Rectforrowatindexpath: (Nsindexpath *) Indexpath; Gets the position size of the cell

-(Nullable Nsindexpath *) Indexpathforrowatpoint: (cgpoint) point; Click a dot to get the index of the cell where the pity Dorado is located

-(Nullable Nsindexpath *) Indexpathforcell: (UITableViewCell *) cell; Get cell index

-(Nullable Nsarray<nsindexpath *> *) Indexpathsforrowsinrect: (cgrect) Rect;zai ' MoU ' G area returns information for multiple cells

-(Nullable __kindof UITableViewCell *) Cellforrowatindexpath: (Nsindexpath *) Indexpath; Get cells by cell index

-(Nullable Uitableviewheaderfooterview *) Headerviewforsection: (nsinteger) section; Set Header view
-(Nullable Uitableviewheaderfooterview *) Footerviewforsection: (nsinteger) section; Set footer view

-(void) Scrolltorowatindexpath: (Nsindexpath *) Indexpath atscrollposition: (uitableviewscrollposition) Scrollposition animated: (BOOL) animated; Table view navigates to a row
-(void) Scrolltonearestselectedrowatscrollposition: (uitableviewscrollposition) scrollposition animated: (BOOL) Animated; Table view anchored to row selected

-(void) beginupdates; only additions or deletions will update the number of rows
-(void) endupdates; Add or remove calls when adding or removing methods is not updated

-(void) Insertsections: (Nsindexset *) Sections withrowanimation: (uitableviewrowanimation) animation; Insert one or more groups and use animations
-(void) Deletesections: (Nsindexset *) Sections withrowanimation: (uitableviewrowanimation) animation; Delete one or more groups and use animations
-(void) Reloadsections: (Nsindexset *) Sections withrowanimation: (uitableviewrowanimation) animation; update one or more groups and use animations
-(void) Movesection: (nsinteger) Section tosection: (Nsinteger) newsection; moving a group to a target group
-(void) Insertrowsatindexpaths: (Nsarray<nsindexpath *> *) indexpaths withrowanimation: ( uitableviewrowanimation) animation; insert one or more cells and use animations
-(void) Deleterowsatindexpaths: (Nsarray<nsindexpath *> *) indexpaths withrowanimation: ( uitableviewrowanimation) animation; Delete one or more cells and use animations
-(void) Reloadrowsatindexpaths: (Nsarray<nsindexpath *> *) indexpaths withrowanimation: ( uitableviewrowanimation) Animation update cells and use animations
-(void) Moverowatindexpath: (Nsindexpath *) Indexpath Toindexpath: (Nsindexpath *) newindexpath move cell to a target cell

-(void) setediting: (BOOL) editing animated: (bool) animated; Enter edit state and set whether to use animation

-(void) Selectrowatindexpath: (Nullable Nsindexpath *) Indexpath animated: (BOOL) animated scrollposition: ( uitableviewscrollposition) scrollposition; Sets the cell selected for a range
-(void) Deselectrowatindexpath: (Nsindexpath *) Indexpath animated: (BOOL) animated; unselected cells

-(Nullable __kindof UITableViewCell *) Dequeuereusablecellwithidentifier: (NSString *) identifier; Get the cells inside the reuse queue

-(__kindof UITableViewCell *) Dequeuereusablecellwithidentifier: (NSString *) identifier Forindexpath: (NSIndexPath *) Indexpath; Remove a row of cells from the index to reuse

-(Nullable __kindof Uitableviewheaderfooterview *) Dequeuereusableheaderfooterviewwithidentifier: (NSString *) identifier; Sets the identifier of the reused cell in the queue

Data proxy:

-(Nsinteger) TableView: (UITableView *) TableView numberofrowsinsection: (nsinteger) Section; Set the number of table rows

-(UITableViewCell *) TableView: (UITableView *) TableView Cellforrowatindexpath: (Nsindexpath *) Indexpath; Set cell display contents

-(Nsinteger) Numberofsectionsintableview: (UITableView *) TableView; Set Number of table groups

-(Nullable NSString *) TableView: (UITableView *) TableView titleforheaderinsection: (nsinteger) section; Specifies the title of a group header specified in the table

-(Nullable NSString *) TableView: (UITableView *) TableView titleforfooterinsection: (nsinteger) section; Specifies the title of a group footer specified in the table

-(BOOL) TableView: (UITableView *) TableView Caneditrowatindexpath: (Nsindexpath *) Indexpath; Set whether cells can be edited

-(BOOL) TableView: (UITableView *) TableView Canmoverowatindexpath: (Nsindexpath *) Indexpath; Set whether cell can be moved

-(Nullable nsarray<nsstring *> *) Sectionindextitlesfortableview: (UITableView *) TableView; Right index title

-(Nsinteger) TableView: (UITableView *) TableView sectionforsectionindextitle: (NSString *) title Atindex: (Nsinteger) Index; The method to invoke when clicking on the right

-(void) TableView: (UITableView *) TableView Commiteditingstyle: (uitableviewcelleditingstyle) Editingstyle Forrowatindexpath: (Nsindexpath *) indexpath; Edit cells

-(void) TableView: (UITableView *) TableView Moverowatindexpath: (Nsindexpath *) Sourceindexpath Toindexpath: ( Nsindexpath *) Destinationindexpath; moving cells

Agent:

-(void) TableView: (UITableView *) TableView Willdisplaycell: (UITableViewCell *) cell Forrowatindexpath: (Nsindexpath *) Indexpath; cell will be displayed
-(void) TableView: (UITableView *) TableView Willdisplayheaderview: (UIView *) View forsection: (nsinteger) Section ; The group header view will be displayed
-(void) TableView: (UITableView *) TableView Willdisplayfooterview: (UIView *) View forsection: (nsinteger) Section The group footer is going to be displayed
-(void) TableView: (UITableView *) TableView Didenddisplayingcell: (UITableViewCell *) cell Forrowatindexpath: ( nsindexpath*) Indexpath; cell already displayed
-(void) TableView: (UITableView *) TableView Didenddisplayingheaderview: (UIView *) View forsection: (nsinteger) Section; Group header view already displayed
-(void) TableView: (UITableView *) TableView Didenddisplayingfooterview: (UIView *) View forsection: (nsinteger) Section ; The group footer is already displayed

-(CGFloat) TableView: (UITableView *) TableView Heightforrowatindexpath: (Nsindexpath *) Indexpath; cell height
-(CGFloat) TableView: (UITableView *) TableView heightforheaderinsection: (nsinteger) section; table Header height
-(CGFloat) TableView: (UITableView *) TableView heightforfooterinsection: (nsinteger) section; footer height
-(CGFloat) TableView: (UITableView *) TableView Estimatedheightforrowatindexpath: (Nsindexpath *) indexpath; estimated cell height
-(CGFloat) TableView: (UITableView *) TableView estimatedheightforheaderinsection: (nsinteger) section; estimate header height (IOS7)
-(CGFloat) TableView: (UITableView *) TableView estimatedheightforfooterinsection: (nsinteger) section; estimated footer height (ios7)
-(Nullable UIView *) TableView: (UITableView *) TableView viewforheaderinsection: (nsinteger) Section; Set Header view (IOS7)
-(Nullable UIView *) TableView: (UITableView *) TableView viewforfooterinsection: (nsinteger) Section; Set footer View
-(Uitableviewcellaccessorytype) TableView: (UITableView *) TableView Accessorytypeforrowwithindexpath: (Nsindexpath * ) Indexpath; Sets the right form of a cell
-(void) TableView: (UITableView *) TableView Accessorybuttontappedforrowwithindexpath: (Nsindexpath *) Indexpath ; The response method for the right button on a cell
-(BOOL) TableView: (UITableView *) TableView Shouldhighlightrowatindexpath: (Nsindexpath *) Indexpath; Click Status to show Highlight
-(void) TableView: (UITableView *) TableView Didhighlightrowatindexpath: (Nsindexpath *) Indexpath; method of cell highlighting state invocation
-(void) TableView: (UITableView *) TableView Didunhighlightrowatindexpath: (Nsindexpath *) Indexpath; Cell is not a highlighted method of execution
-(Nullable Nsindexpath *) TableView: (UITableView *) TableView Willselectrowatindexpath: (Nsindexpath *) Indexpath; The method that the cell execution will be selected
-(Nullable Nsindexpath *) TableView: (UITableView *) TableView Willdeselectrowatindexpath: (Nsindexpath *) Indexpath; You are about to uncheck the execution method
-(void) TableView: (UITableView *) TableView Didselectrowatindexpath: (Nsindexpath *) Indexpath; How to select cells to execute
-(void) TableView: (UITableView *) TableView Diddeselectrowatindexpath: (Nsindexpath *) Indexpath; Deselect methods for cell execution
-(Uitableviewcelleditingstyle) TableView: (UITableView *) TableView Editingstyleforrowatindexpath: (Nsindexpath *) Indexpath; editable by cell
-(Nullable NSString *) TableView: (UITableView *) TableView Titlefordeleteconfirmationbuttonforrowatindexpath: ( Nsindexpath *) Indexpath, cell Delete the text above the move modifier button
-(Nullable nsarray<uitableviewrowaction *> *) TableView: (UITableView *) TableView Editactionsforrowatindexpath :(Nsindexpath *) indexpath; slide show more interactive buttons (IOS8_0)
-(BOOL) TableView: (UITableView *) TableView Shouldindentwhileeditingrowatindexpath: (Nsindexpath *) Indexpath; The cell does not indent when you enter the editing state
-(void) TableView: (uitableview*) TableView Willbegineditingrowatindexpath: (Nsindexpath *) Indexpath; going into edit state
-(void) TableView: (uitableview*) TableView Didendeditingrowatindexpath: (Nsindexpath *) Indexpath when the editing state is completed;
-(Nsindexpath *) TableView: (UITableView *) TableView Targetindexpathformovefromrowatindexpath: (Nsindexpath *) Sourceindexpath Toproposedindexpath: (Nsindexpath *) Proposeddestinationindexpath, whether the current cell position can be replaced, if not, give the suggested location
-(Nsinteger) TableView: (UITableView *) TableView Indentationlevelforrowatindexpath: (Nsindexpath *) Indexpath; line Indent
-(BOOL) TableView: (UITableView *) TableView Shouldshowmenuforrowatindexpath: (Nsindexpath *) Indexpath; Whether to allow the Mune menu to display long-pressed poems
-(BOOL) TableView: (UITableView *) TableView canperformaction: (SEL) Action Forrowatindexpath: (Nsindexpath *) Indexpath Withsender: (nullable ID) sender, whether each cell can display the Mune menu at Long Press
-(void) TableView: (UITableView *) TableView performaction: (SEL) Action Forrowatindexpath: (Nsindexpath *) Indexpath Withsender: (nullable ID) sender; tells the representative to perform a copy or paste operation on a given line.
-(BOOL) TableView: (UITableView *) TableView Canfocusrowatindexpath: (Nsindexpath *) Indexpath (IOS9);
-(BOOL) TableView: (UITableView *) TableView shouldupdatefocusincontext: (Uitableviewfocusupdatecontext *) (IOS9);
-(void) TableView: (UITableView *) TableView didupdatefocusincontext: (Uitableviewfocusupdatecontext *) context Withanimationcoordinator: (Uifocusanimationcoordinator *) Coordinator (IOS9);
-(Nullable Nsindexpath *) Indexpathforpreferredfocusedviewintableview: (UITableView *) TableView (IOS9);



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.