-Tableview:cellforrowatindexpath:
Required
asks the data source for a cell to insert a particular location of the table view. (required)//Request a cell data from the data source to insert into the table view
Declaration Declaration
SWIFT
func TableView (_ Tableview:uitableview,
Cellforrowatindexpath Indexpath:nsindexpath), UITableViewCell
Objective-c
-(UITableViewCell *) TableView: (UITableView *) TableView
Cellforrowatindexpath: ( Nsindexpath *) indexpath
Parameters Parameters
tableview
A Table-view Object requesting the cell.// A table View object requests a cell
Indexpath index path
An index path locating a row in tableview.//a row of data in a table view
Return Value
An object inheriting inherits from UITableViewCell, the table view can use for the specified row. An assertion are raised if you return nil.
Discussion
The returned UITableViewCell object is frequently one, the application reuses for performance reasons. You should fetch a previously created Cell object this is marked for reuse by sending a dequeuereusablecellwithidentifier: Message to TableView. Various attributes of a table cell was set automatically based on whether the cell was a separator and on information the D ATA source provides, such as for accessory views and editing controls.
Import Statement
Objective-c
@import UIKit;
SWIFT
Import UIKit
-Tableview:numberofrowsinsection:
Required
Tells the data source to return the number of rows in a given section of a table view. (required)//returns the number of rows
Declaration statement
SWIFT
Func TableView (_ Tableview:uitableview,
Numberofrowsinsection section:int)-Int
Objective-c
-(Nsinteger) TableView: (UITableView *) TableView
Numberofrowsinsection: (Nsinteger) Section
Parameters parameters
TableView
The Table-view object requesting this information.
Section
An index number identifying a section in TableView.
Return Value
The number of rows in a section.
Import Statement
Objective-c
@import UIKit;
SWIFT
Import UIKit
Uitableviewdatasource the methods that must be followed