Skip to main content

UITableViewDataSource

Trait UITableViewDataSource 

Source
pub unsafe trait UITableViewDataSource: NSObjectProtocol + MainThreadOnly {
    // Provided methods
    fn tableView_numberOfRowsInSection(
        &self,
        table_view: &UITableView,
        section: NSInteger,
    ) -> NSInteger
       where Self: Sized + Message { ... }
    fn tableView_cellForRowAtIndexPath(
        &self,
        table_view: &UITableView,
        index_path: &NSIndexPath,
    ) -> Retained<UITableViewCell>
       where Self: Sized + Message { ... }
    fn numberOfSectionsInTableView(&self, table_view: &UITableView) -> NSInteger
       where Self: Sized + Message { ... }
    fn tableView_titleForHeaderInSection(
        &self,
        table_view: &UITableView,
        section: NSInteger,
    ) -> Option<Retained<NSString>>
       where Self: Sized + Message { ... }
    fn tableView_titleForFooterInSection(
        &self,
        table_view: &UITableView,
        section: NSInteger,
    ) -> Option<Retained<NSString>>
       where Self: Sized + Message { ... }
    fn tableView_canEditRowAtIndexPath(
        &self,
        table_view: &UITableView,
        index_path: &NSIndexPath,
    ) -> bool
       where Self: Sized + Message { ... }
    fn tableView_canMoveRowAtIndexPath(
        &self,
        table_view: &UITableView,
        index_path: &NSIndexPath,
    ) -> bool
       where Self: Sized + Message { ... }
    fn sectionIndexTitlesForTableView(
        &self,
        table_view: &UITableView,
    ) -> Option<Retained<NSArray<NSString>>>
       where Self: Sized + Message { ... }
    fn tableView_sectionForSectionIndexTitle_atIndex(
        &self,
        table_view: &UITableView,
        title: &NSString,
        index: NSInteger,
    ) -> NSInteger
       where Self: Sized + Message { ... }
    fn tableView_commitEditingStyle_forRowAtIndexPath(
        &self,
        table_view: &UITableView,
        editing_style: UITableViewCellEditingStyle,
        index_path: &NSIndexPath,
    )
       where Self: Sized + Message { ... }
    fn tableView_moveRowAtIndexPath_toIndexPath(
        &self,
        table_view: &UITableView,
        source_index_path: &NSIndexPath,
        destination_index_path: &NSIndexPath,
    )
       where Self: Sized + Message { ... }
}
Available on crate feature UITableView only.
Expand description

Provided Methods§

Source

fn tableView_numberOfRowsInSection( &self, table_view: &UITableView, section: NSInteger, ) -> NSInteger
where Self: Sized + Message,

Available on crate features UIResponder and UIScrollView and UIView only.
Source

fn tableView_cellForRowAtIndexPath( &self, table_view: &UITableView, index_path: &NSIndexPath, ) -> Retained<UITableViewCell>
where Self: Sized + Message,

Available on crate features UIResponder and UIScrollView and UITableViewCell and UIView only.
Source

fn numberOfSectionsInTableView(&self, table_view: &UITableView) -> NSInteger
where Self: Sized + Message,

Available on crate features UIResponder and UIScrollView and UIView only.
Source

fn tableView_titleForHeaderInSection( &self, table_view: &UITableView, section: NSInteger, ) -> Option<Retained<NSString>>
where Self: Sized + Message,

Available on crate features UIResponder and UIScrollView and UIView only.
Source

fn tableView_titleForFooterInSection( &self, table_view: &UITableView, section: NSInteger, ) -> Option<Retained<NSString>>
where Self: Sized + Message,

Available on crate features UIResponder and UIScrollView and UIView only.
Source

fn tableView_canEditRowAtIndexPath( &self, table_view: &UITableView, index_path: &NSIndexPath, ) -> bool
where Self: Sized + Message,

Available on crate features UIResponder and UIScrollView and UIView only.
Source

fn tableView_canMoveRowAtIndexPath( &self, table_view: &UITableView, index_path: &NSIndexPath, ) -> bool
where Self: Sized + Message,

Available on crate features UIResponder and UIScrollView and UIView only.
Source

fn sectionIndexTitlesForTableView( &self, table_view: &UITableView, ) -> Option<Retained<NSArray<NSString>>>
where Self: Sized + Message,

Available on crate features UIResponder and UIScrollView and UIView only.
Source

fn tableView_sectionForSectionIndexTitle_atIndex( &self, table_view: &UITableView, title: &NSString, index: NSInteger, ) -> NSInteger
where Self: Sized + Message,

Available on crate features UIResponder and UIScrollView and UIView only.
Source

fn tableView_commitEditingStyle_forRowAtIndexPath( &self, table_view: &UITableView, editing_style: UITableViewCellEditingStyle, index_path: &NSIndexPath, )
where Self: Sized + Message,

Available on crate features UIResponder and UIScrollView and UITableViewCell and UIView only.
Source

fn tableView_moveRowAtIndexPath_toIndexPath( &self, table_view: &UITableView, source_index_path: &NSIndexPath, destination_index_path: &NSIndexPath, )
where Self: Sized + Message,

Available on crate features UIResponder and UIScrollView and UIView only.

Trait Implementations§

Source§

impl<T> ImplementedBy<T> for dyn UITableViewDataSource

Source§

impl ProtocolType for dyn UITableViewDataSource

Source§

const NAME: &'static str = "UITableViewDataSource"

The name of the Objective-C protocol that this type represents. Read more
Source§

fn protocol() -> Option<&'static AnyProtocol>

Get a reference to the Objective-C protocol object that this type represents. Read more

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementations on Foreign Types§

Source§

impl<T> UITableViewDataSource for ProtocolObject<T>

Implementors§

Source§

impl UITableViewDataSource for UITableViewController

Available on crate feature UITableViewController only.
Source§

impl<SectionIdentifierType: ?Sized + Message, ItemIdentifierType: ?Sized + Message> UITableViewDataSource for UITableViewDiffableDataSource<SectionIdentifierType, ItemIdentifierType>

Available on crate feature UIDiffableDataSource only.