You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
+[CLURecordIndicatorViewManager currentViewController] is a universal method which returns current top/active UIViewController instance. Based on this method Clue can show Record indicator view, record only current view controller's view structure and use it as a main overall context for Clue framework.
Right now this method is a part of CLURecordIndicatorViewManager class. But CLURecordIndicatorViewManager is responsible only for managing CLURecordIndicatorView.
Here are places, where Clue use -currentViewController method:
In CLUViewStructureModule to get current view controller and view stature data from it
In ClueController to get current view controller and show record indicator view and utils alert
- (void)startRecording {
UIViewController *currentViewController = [CLURecordIndicatorViewManager currentViewController];
// If user has previous report file (caused by exception) suggest him to resend itif ([[CLUReportFileManager sharedManager] isReportZipFileAvailable]) {
[selfshowAlertWithTitle:@"Send Previous Clue Report"message:@"Do you want to send your previous Clue Report caused by internal excpetion?"successActionTitle:@"Send Report"failureActionTitle:@"Delete Report"successHandler:^{
[selfsendReportWithEmailService];
} failureHandler:^{
[[CLUReportFileManager sharedManager] removeReportZipFile];
}
inViewController:currentViewController];
return;
}
if (!_isRecording) {
_isRecording = YES;
[_reportComposer startRecording];
NSDateComponents *maxTime = [CLURecordIndicatorViewManager defaultMaxTime];
[CLURecordIndicatorViewManager showRecordIndicatorInViewController:currentViewController
withMaxTime:maxTime
target:selfandAction:@selector(stopRecording)];
}
}
In ClueController to get current view controller and show modal mail window
- (void)sendReportWithEmailService {
UIViewController *currentViewController = [CLURecordIndicatorViewManager currentViewController];
CLUMailHelper *mailHelper = [[CLUMailHelper alloc] initWithOption:_options];
[mailHelper setMailDelegate:_mailDelegate];
// TODO: test it on real device. Mail isn't working on simulatorif (currentViewController) {
[mailHelper showMailComposeWindowWithViewController:currentViewController];
}
}
Problem
+[CLURecordIndicatorViewManager currentViewController] method should not belong to CLURecordIndicatorViewManager. because it's universal method for getting current view controller across the framework
Description
+[CLURecordIndicatorViewManager currentViewController]
is a universal method which returns current top/activeUIViewController
instance. Based on this method Clue can show Record indicator view, record only current view controller's view structure and use it as a main overall context for Clue framework.Right now this method is a part of
CLURecordIndicatorViewManager
class. ButCLURecordIndicatorViewManager
is responsible only for managing CLURecordIndicatorView.Here are places, where Clue use
-currentViewController
method:CLUViewStructureModule
to get current view controller and view stature data from itClueController
to get current view controller and show record indicator view and utils alertClueController
to get current view controller and show modal mail windowProblem
+[CLURecordIndicatorViewManager currentViewController]
method should not belong to CLURecordIndicatorViewManager. because it's universal method for getting current view controller across the frameworkReferences
ClueController
CLURecordIndicatorViewManager
UIViewController
The text was updated successfully, but these errors were encountered: