CLURecordIndicatorViewManager
@interface CLURecordIndicatorViewManager : NSObject
CLURecordIndicatorViewManager is a class which show CLURecordIndicatorView view object for specific amount of time, hide it and switch modes of CLURecordIndicatorView. Also return useful view related information like current top view controller in stack.
-
Show
CLURecordIndicatorViewview object with animation in specificUIViewController, with target and action for specific amount of time. After time has passed - target & action get triggered.Declaration
Objective-C
+ (void)showRecordIndicatorInViewController:(UIViewController *)viewController withMaxTime:(NSDateComponents *)maxTime target:(id)target andAction:(SEL)action;Swift
class func showRecordIndicator(in viewController: UIViewController!, withMaxTime maxTime: DateComponents!, target: Any!, andAction action: Selector!)Parameters
viewControllerUIViewControllerwhere you want to show recording indicatormaxTimeMaximum time
CLURecordIndicatorViewview will be visible on selected view controller.NSDateComponentsobject with specified minutes and seconds.targetTarget object which will handle action selector
actionAction method selector which will handle the event when
CLURecordIndicatorViewclicked ormaxTimeis over. -
Switch
CLURecordIndicatorViewto waiting mode where user will seeWaiting…
text on the indicator. Used after successful record during report file writing process.Declaration
Objective-C
+ (void)switchRecordIndicatorToWaitingMode;Swift
class func switchRecordIndicatorToWaitingMode() -
Hide
CLURecordIndicatorViewview from selected view controllerDeclaration
Objective-C
+ (void)hideRecordIndicator;Swift
class func hideRecordIndicator() -
Get current
UIViewControllerwhich is on top of view controller’s stack if there is some available.TODO: This method used by different classes, it not only related to record indicator. Needs to be moved to different entity (not
CLURecordIndicatorViewManager)Declaration
Objective-C
+ (UIViewController *)currentViewController;Swift
class func currentViewController() -> UIViewController!Return Value
Current top
UIViewControllerobject. Derived fromUIApplication.keyWindowandNSWindow.rootViewControllerproperty of this window. IfUIApplication.keyWindowandNSWindow.rootViewControllerunavailable method returns nil -
Get default maximum time for
CLURecordIndicatorViewview. It’s also default time for report recording.Declaration
Objective-C
+ (NSDateComponents *)defaultMaxTime;Swift
class func defaultMaxTime() -> DateComponents!Return Value
Default maxTime
NSDateComponentsobject. Which is equal to 3 minutes.
CLURecordIndicatorViewManager Class Reference