pub unsafe trait UIPageControlProgressDelegate: NSObjectProtocol {
// Provided methods
fn pageControlProgress_initialProgressForPage(
&self,
progress: &UIPageControlProgress,
page: NSInteger,
) -> c_float
where Self: Sized + Message { ... }
fn pageControlProgressVisibilityDidChange(
&self,
progress: &UIPageControlProgress,
)
where Self: Sized + Message { ... }
}Available on crate feature
UIPageControlProgress only.Expand description
Provided Methods§
Sourcefn pageControlProgress_initialProgressForPage(
&self,
progress: &UIPageControlProgress,
page: NSInteger,
) -> c_float
fn pageControlProgress_initialProgressForPage( &self, progress: &UIPageControlProgress, page: NSInteger, ) -> c_float
Returns the initial progress (between 0…1) for the specified page. By default, currentProgress is set to 0 when the page changes.
Sourcefn pageControlProgressVisibilityDidChange(
&self,
progress: &UIPageControlProgress,
)
fn pageControlProgressVisibilityDidChange( &self, progress: &UIPageControlProgress, )
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];
}
}