Trait objc2_ui_kit::UICollectionViewDataSource

source ·
pub unsafe trait UICollectionViewDataSource: NSObjectProtocol + IsMainThreadOnly {
    // Provided methods
    unsafe fn collectionView_numberOfItemsInSection(
        &self,
        collection_view: &UICollectionView,
        section: NSInteger
    ) -> NSInteger
       where Self: Sized + Message { ... }
    unsafe fn collectionView_cellForItemAtIndexPath(
        &self,
        collection_view: &UICollectionView,
        index_path: &NSIndexPath
    ) -> Retained<UICollectionViewCell>
       where Self: Sized + Message { ... }
    unsafe fn numberOfSectionsInCollectionView(
        &self,
        collection_view: &UICollectionView
    ) -> NSInteger
       where Self: Sized + Message { ... }
    unsafe fn collectionView_viewForSupplementaryElementOfKind_atIndexPath(
        &self,
        collection_view: &UICollectionView,
        kind: &NSString,
        index_path: &NSIndexPath
    ) -> Retained<UICollectionReusableView>
       where Self: Sized + Message { ... }
    unsafe fn collectionView_canMoveItemAtIndexPath(
        &self,
        collection_view: &UICollectionView,
        index_path: &NSIndexPath
    ) -> bool
       where Self: Sized + Message { ... }
    unsafe fn collectionView_moveItemAtIndexPath_toIndexPath(
        &self,
        collection_view: &UICollectionView,
        source_index_path: &NSIndexPath,
        destination_index_path: &NSIndexPath
    )
       where Self: Sized + Message { ... }
    unsafe fn indexTitlesForCollectionView(
        &self,
        collection_view: &UICollectionView
    ) -> Option<Retained<NSArray<NSString>>>
       where Self: Sized + Message { ... }
    unsafe fn collectionView_indexPathForIndexTitle_atIndex(
        &self,
        collection_view: &UICollectionView,
        title: &NSString,
        index: NSInteger
    ) -> Retained<NSIndexPath>
       where Self: Sized + Message { ... }
}
Available on crate feature UICollectionView only.

Provided Methods§

source

unsafe fn collectionView_numberOfItemsInSection( &self, collection_view: &UICollectionView, section: NSInteger ) -> NSInteger
where Self: Sized + Message,

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

unsafe fn collectionView_cellForItemAtIndexPath( &self, collection_view: &UICollectionView, index_path: &NSIndexPath ) -> Retained<UICollectionViewCell>
where Self: Sized + Message,

Available on crate features UICollectionViewCell and UIResponder and UIScrollView and UIView only.
source

unsafe fn numberOfSectionsInCollectionView( &self, collection_view: &UICollectionView ) -> NSInteger
where Self: Sized + Message,

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

unsafe fn collectionView_viewForSupplementaryElementOfKind_atIndexPath( &self, collection_view: &UICollectionView, kind: &NSString, index_path: &NSIndexPath ) -> Retained<UICollectionReusableView>
where Self: Sized + Message,

Available on crate features UICollectionViewCell and UIResponder and UIScrollView and UIView only.
source

unsafe fn collectionView_canMoveItemAtIndexPath( &self, collection_view: &UICollectionView, index_path: &NSIndexPath ) -> bool
where Self: Sized + Message,

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

unsafe fn collectionView_moveItemAtIndexPath_toIndexPath( &self, collection_view: &UICollectionView, source_index_path: &NSIndexPath, destination_index_path: &NSIndexPath )
where Self: Sized + Message,

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

unsafe fn indexTitlesForCollectionView( &self, collection_view: &UICollectionView ) -> Option<Retained<NSArray<NSString>>>
where Self: Sized + Message,

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

unsafe fn collectionView_indexPathForIndexTitle_atIndex( &self, collection_view: &UICollectionView, title: &NSString, index: NSInteger ) -> Retained<NSIndexPath>
where Self: Sized + Message,

Available on crate features UIResponder and UIScrollView and UIView only.

Trait Implementations§

source§

impl ProtocolType for dyn UICollectionViewDataSource

source§

const NAME: &'static str = "UICollectionViewDataSource"

The name of the Objective-C protocol that this type represents.
source§

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

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

impl<T> ImplementedBy<T> for dyn UICollectionViewDataSource

Implementations on Foreign Types§

source§

impl<T> UICollectionViewDataSource for ProtocolObject<T>

Implementors§

source§

impl UICollectionViewDataSource for UICollectionViewController

Available on crate features UIResponder and UIViewController and UICollectionViewController only.
source§

impl<SectionIdentifierType: ?Sized + Message, ItemIdentifierType: ?Sized + Message> UICollectionViewDataSource for UICollectionViewDiffableDataSource<SectionIdentifierType, ItemIdentifierType>

Available on crate feature UIDiffableDataSource only.