Trait UIPageControlProgressDelegate

Source
pub unsafe trait UIPageControlProgressDelegate: NSObjectProtocol {
    // Provided methods
    unsafe fn pageControlProgress_initialProgressForPage(
        &self,
        progress: &UIPageControlProgress,
        page: NSInteger,
    ) -> c_float
       where Self: Sized + Message { ... }
    unsafe fn pageControlProgressVisibilityDidChange(
        &self,
        progress: &UIPageControlProgress,
    )
       where Self: Sized + Message { ... }
}
Available on crate feature UIPageControlProgress only.
Expand description

Provided Methods§

Source

unsafe fn pageControlProgress_initialProgressForPage( &self, progress: &UIPageControlProgress, page: NSInteger, ) -> c_float
where Self: Sized + Message,

Returns the initial progress (between 0…1) for the specified page. By default, currentProgress is set to 0 when the page changes.

Source

unsafe fn pageControlProgressVisibilityDidChange( &self, progress: &UIPageControlProgress, )
where Self: Sized + Message,

Called when the page control progress visibility has changed, which could occur when the page control is being interacted with. The page control progress becomes hidden when the user begins to interact with the page control (when it begins continuous interaction), and is visible again when the user stops interacting with the control. Observe the page control progress visibility to pause or resume the paging content.

Example:

 - (void)pageControlProgressVisibilityDidChange:(UIPageControlProgress *)progress {
     BOOL isProgressVisible = progress.isProgressVisible;
     if (isProgressVisible) {
         [self _resumeContentFromInteractionChanges];
     } else {
         [self _pauseContentFromInteractionChanges];
     }
 }

Trait Implementations§

Source§

impl ProtocolType for dyn UIPageControlProgressDelegate

Source§

const NAME: &'static str = "UIPageControlProgressDelegate"

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
Source§

impl<T> ImplementedBy<T> for dyn UIPageControlProgressDelegate

Implementations on Foreign Types§

Source§

impl<T> UIPageControlProgressDelegate for ProtocolObject<T>

Implementors§