Other Protocols
The following protocols are available globally.
-
Undocumented
See moreDeclaration
Objective-C
@protocol CredentialsExchanging -(void) exchangeEmail:(NSString *)email password:(NSString *)password completion:(CredentialsExchangeCompletionBlock)completion; -(void) validatedTokenWithForcedRefresh:(BOOL)forceRefresh completion:(CredentialsExchangeCompletionBlock)completion; -(void) signOut; -(nullable NSString *) username; -(nullable NSString *) password; -(nullable NSString *) jwtToken; // For migration to new credentials storage; may not be valid @end
Swift
protocol CredentialsExchanging
-
Undocumented
See moreDeclaration
Objective-C
@protocol RichieBackgroundTask <NSObject> -(void) endTask; @property (nonatomic, readonly) BOOL isRunning; @end
Swift
protocol RichieBackgroundTask : NSObjectProtocol
-
Undocumented
See moreDeclaration
Objective-C
@protocol RichieBackgroundTaskSource -(UIBackgroundTaskIdentifier) beginBackgroundTaskWithName:(NSString *)taskName expirationHandler:(void(^)(void))handler; -(void) endBackgroundTask:(UIBackgroundTaskIdentifier)identifier; /** Returns a lifetime token. Background task is ended when token object is deallocated or -endTask is called explicitly. There is not expiration handler, because we don't do anything in them. */ -(id<RichieBackgroundTask>) backgroundTaskWithName:(NSString *)name; @end
Swift
protocol RichieBackgroundTaskSource
-
See moreRichieCryptor
is an interface for encrypting or decrypting data.Declaration
Objective-C
@protocol RichieCryptor <NSObject>
Swift
protocol RichieCryptor : NSObjectProtocol
-
Undocumented
See moreDeclaration
Objective-C
@protocol RichiePageScrollerViewDataSource <NSObject> -(NSInteger) numberOfPagesInPageScrollerView:(RichiePageScrollerView *)pageScrollerView; -(UIView *) pageScrollerView:(RichiePageScrollerView *)pageScrollerView pageAtIndex:(NSInteger)pageIndex; -(CGFloat) pageScrollerView:(RichiePageScrollerView *)pageScrollerView widthOfPageAtIndex:(NSInteger)pageIndex; //!< Controls the width (or height in non-horizontalMode) of page. Height (or width) of page is used as returned by -pageScrollerView:pageAtIndex:, centered and respecting autoresizing masks. @optional -(CGFloat) pageScrollerView:(RichiePageScrollerView *)pageScrollerView paddingAfterPageAtIndex:(NSInteger)pageIndex; -(void) pageScrollerView:(RichiePageScrollerView *)pageScrollerView didRemovePageView:(UIView *)view atIndex:(NSInteger)pageIndex; //!< Called after view has been removed from view hierarcy. @end
Swift
protocol RichiePageScrollerViewDataSource : NSObjectProtocol
-
Undocumented
See moreDeclaration
Objective-C
@protocol RichiePageScrollerViewDelegate <NSObject> @optional -(void) pageScrollerViewWillBeginDragging:(RichiePageScrollerView *)pageScrollerView; //!< Called just as dragging starts. -(void) pageScrollerViewDidScroll:(RichiePageScrollerView *)pageScrollerView; //!< Called whenever view is scrolled. -(void) pageScrollerView:(RichiePageScrollerView *)pageScrollerView didScrollToPageAtIndex:(NSInteger)pageIndex fromPageAtIndex:(NSInteger)previousPageIndex; //!< Called when scrolling causes current page to change. -(void) pageScrollerView:(RichiePageScrollerView *)pageScrollerView didStopAtPageAtIndex:(NSInteger)pageIndex userGesture:(BOOL)userGesture; //!< Called after scrolling has stopped. -(void) pageScrollerViewDidEndDragging:(RichiePageScrollerView *)pageScrollerView; //!< Called after dragging ends. @end
Swift
protocol RichiePageScrollerViewDelegate : NSObjectProtocol
-
Undocumented
See moreDeclaration
Objective-C
@protocol RichieSwiper <NSObject> -(CGRect) frameForPageAtIndex:(NSInteger)pageIndex; //!< Calculated frame for given pageIndex. Useful for returning views with correct frame from DataSource. @property (nonatomic) NSInteger numberOfPages; /** The index of the page currently being displayed in the swiper. Setting this property is same as calling -setCurrentPageIndex:newPageIndex animated:NO. Changing current page index programmatically will cause delegate notifications of page disappearing and appearing called normally. */ @property (nonatomic) NSInteger currentPageIndex; /** Changes the page currently being displayed in the swiper. If animated is YES, the change will happen with a scrolling animation. Changing current page index programmatically will cause delegate notifications of page disappearing and appearing called normally. */ -(void) setCurrentPageIndex:(NSInteger)newPageIndex animated:(BOOL)animated; /** Causes DataSource to be queried and all current data to be discarded. Analogous to UITableView method -reloadData. NOTE: Calling this won't cause -swiper:pageDidDisappear: delegate method to be called on possibly disappearing page, but -swiper:pageDidAppear: will be called for the new page. If all page data doesn't actually change underneath, the newly appearing page could've actually been the previously already appeared page. */ -(void) reloadData; /** Will cause DataSource to be queried if necessary (when the newly inserted page needs to be actually inserted to view hierarchy). */ -(void) insertPageAtIndex:(NSInteger)pageIndex; -(void) removePageAtIndex:(NSInteger)pageIndex; @end
Swift
protocol RichieSwiper : NSObjectProtocol
-
Undocumented
See moreDeclaration
Objective-C
@protocol RichieSwiperDataSource <NSObject> /** If the number of pages in Swiper changes, call -reloadData to let the know that. */ -(NSInteger) numberOfPagesInSwiper:(id<RichieSwiper>)swiper; /** DataSource is responsible for creating views for pages. It can use -[RichieSwiper frameForPageAtIndex:] for creating the view with correct size. RichieSwiper itself doesn't use auto layout, but pages can use auto layout internally. Note that the returned view will have it's frame set so it's as wide as the swiper view, and centered vertically if it's shorter than swiper view. */ -(UIView *) swiper:(id<RichieSwiper>)swiper pageAtIndex:(NSInteger)pageIndex; @optional /** Called after RichieSwiper has removed page view from view hierarchy. This is an opportunity for the DataSource to do any necessary tear down (clearing delegates, stopping operations) if page view instances aren't recycled or otherwise cached. Also, this method can be used to gather views for recycling (manually), similar to how UITableView recycles cell views. Views cached for recycling in this call can be later returned by -swiper:pageAtIndex:. */ -(void) swiper:(id<RichieSwiper>)swiper didRemovePage:(UIView *)view atIndex:(NSInteger)pageIndex; @end
Swift
protocol RichieSwiperDataSource : NSObjectProtocol
-
Undocumented
See moreDeclaration
Objective-C
@protocol RichieSwiperDataSourceAdViewPolicy <NSObject> -(UIView *) viewForSwiper:(id<RichieSwiper>)swiper atIndex:(NSInteger)pageIndex; -(void) pageWasRemoved:(__kindof UIView *)view inSwiper:(id<RichieSwiper> __unused)swiper atIndex:(NSInteger)pageIndex isAdPage:(BOOL)isAdPage; @property (nonatomic, readonly) NSInteger numberOfAdViews; -(void) pageDidAppear:(NSInteger)pageIndex inSwiper:(id<RichieSwiper>)swiper isAdPage:(BOOL)isAdPage isFirstAppearance:(BOOL)isFirstAppearance; -(void) pageDidDisappear:(NSInteger)pageIndex inSwiper:(id<RichieSwiper>)swiper isAdPage:(BOOL)isAdPage; -(NSInteger) currentPageIndexRestoringAdViewsWhenSettingCurrentPageIndex:(NSInteger)newPageIndex withNumberOfOriginPages:(NSInteger)numberOfOriginPages; -(BOOL) isAdIndex:(NSInteger)pageIndex; -(NSInteger) swiperIndexFromOriginIndex:(NSInteger)originIndex; -(NSInteger) originIndexFromSwiperIndex:(NSInteger)swiperIndex; -(void) willReloadDataWithNumberOfOriginPages:(NSInteger)numberOfOriginPages; -(void) didReloadData; -(void) didInsertPageAtOriginIndex:(NSInteger)originIndex inSwiper:(id<RichieSwiper>)swiper; @property (nonatomic, readonly) BOOL areAppearanceCallbacksDisabled; @end
Swift
protocol RichieSwiperDataSourceAdViewPolicy : NSObjectProtocol
-
Undocumented
See moreDeclaration
Objective-C
@protocol RichieSwiperDelegate <NSObject> @optional -(void) swiper:(id<RichieSwiper>)swiper pageDidAppear:(NSInteger)pageIndex userGesture:(BOOL)userGesture; -(void) swiper:(id<RichieSwiper>)swiper pageDidDisappear:(NSInteger)pageIndex; /** leftPage or rightPage can be -1 if it's not a valid page index, such as when past begin or end of swiper. Percentage ([-1, 1]) is the completeness of panning transition from left page to right page. Negative percentage values mean percentage is from rightPage to leftPage, positive percentage values mean distance is from leftPage to rightPage. When a page is invalid (-1), percentage is from the valid page. For example, leftPage == -1 and rightPage == 0, percentage will be negative (or zero), because panning is from the rightPage to left. When leftPage == <last page index> and rightPage == -1, percentage will be positive (or zero), signifying panning is to right from leftPage. Also, when leftPage == 1 and rightPage == 2, percentage == 0.75 and percentage == -0.25 are the same thing: panning transition is 75% complete from the left page to the right page. */ -(void) swiper:(id<RichieSwiper>)swiper didPanToPercent:(float)percent betweenPage:(NSInteger)leftPage andPage:(NSInteger)rightPage; @end
Swift
protocol RichieSwiperDelegate : NSObjectProtocol
-
Undocumented
See moreDeclaration
Objective-C
@protocol RichieSwiperSlotAdProvider <NSObject> -(RichieAdsSlotAdFlight *) nextFlight; -(RichieAdsView *) viewWithFrame:(CGRect)frame forAdFlight:(RichieAdsSlotAdFlight *)slotAdFlight; @end
Swift
protocol RichieSwiperSlotAdProvider : NSObjectProtocol
-
Protocol that represents a cancelable operation.
See moreDeclaration
Swift
public protocol Cancelable
-
See moreStartable
is a protocol that defines astart
operation that takes a completion block.Declaration
Swift
public protocol Startable<Output, Failure>
-
StartableCancelable
combinesStartable
andCancelable
.Declaration
Swift
public protocol StartableCancelable<Output, Failure> : Cancelable, Startable
-
Undocumented
See moreDeclaration
Swift
public protocol AudioHostAppEventSink