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
CLURecordIndicatorView
view 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
viewController
UIViewController
where you want to show recording indicatormaxTime
Maximum time
CLURecordIndicatorView
view will be visible on selected view controller.NSDateComponents
object with specified minutes and seconds.target
Target object which will handle action selector
action
Action method selector which will handle the event when
CLURecordIndicatorView
clicked ormaxTime
is over. -
Switch
CLURecordIndicatorView
to 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
CLURecordIndicatorView
view from selected view controllerDeclaration
Objective-C
+ (void)hideRecordIndicator;
Swift
class func hideRecordIndicator()
-
Get current
UIViewController
which 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
UIViewController
object. Derived fromUIApplication.keyWindow
andNSWindow.rootViewController
property of this window. IfUIApplication.keyWindow
andNSWindow.rootViewController
unavailable method returns nil -
Get default maximum time for
CLURecordIndicatorView
view. It’s also default time for report recording.Declaration
Objective-C
+ (NSDateComponents *)defaultMaxTime;
Swift
class func defaultMaxTime() -> DateComponents!
Return Value
Default maxTime
NSDateComponents
object. Which is equal to 3 minutes.