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 specific UIViewController, 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 indicator

    maxTime

    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 or maxTime is over.

  • Switch CLURecordIndicatorView to waiting mode where user will see Waiting… 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 controller

    Declaration

    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 from UIApplication.keyWindow and NSWindow.rootViewController property of this window. If UIApplication.keyWindow and NSWindow.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.