mirror of
https://gitlab.linphone.org/BC/public/linphone-iphone.git
synced 2026-01-17 11:08:06 +00:00
Remove legacy support code
This commit is contained in:
parent
1ea8d5b032
commit
da971b73e1
7 changed files with 5 additions and 136 deletions
|
|
@ -125,18 +125,7 @@ static UICompositeViewDescription *compositeDescription = nil;
|
|||
}
|
||||
|
||||
+ (UIScrollView *)defaultScrollView:(UIWebView *)webView {
|
||||
UIScrollView *scrollView = nil;
|
||||
|
||||
if ([[UIDevice currentDevice].systemVersion doubleValue] >= 5.0) {
|
||||
return webView.scrollView;
|
||||
} else {
|
||||
for (UIView *subview in [webView subviews]) {
|
||||
if ([subview isKindOfClass:[UIScrollView class]]) {
|
||||
scrollView = (UIScrollView *)subview;
|
||||
}
|
||||
}
|
||||
}
|
||||
return scrollView;
|
||||
}
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -238,13 +238,6 @@ static void sync_address_book (ABAddressBookRef addressBook, CFDictionaryRef inf
|
|||
[tableController.tableView setBackgroundView:nil]; // Can't do it in Xib: issue with ios4
|
||||
}
|
||||
|
||||
- (void)viewWillDisappear:(BOOL)animated {
|
||||
[super viewWillDisappear:animated];
|
||||
if ([[UIDevice currentDevice].systemVersion doubleValue] < 5.0) {
|
||||
[tableController viewWillDisappear:animated];
|
||||
}
|
||||
}
|
||||
|
||||
- (void)viewWillAppear:(BOOL)animated {
|
||||
[super viewWillAppear:animated];
|
||||
if([ContactSelection getSelectionMode] == ContactSelectionModeEdit ||
|
||||
|
|
@ -253,25 +246,7 @@ static void sync_address_book (ABAddressBookRef addressBook, CFDictionaryRef inf
|
|||
} else {
|
||||
[editButton setHidden:TRUE];
|
||||
}
|
||||
if ([[UIDevice currentDevice].systemVersion doubleValue] < 5.0) {
|
||||
[tableController viewWillAppear:animated];
|
||||
}
|
||||
}
|
||||
|
||||
- (void)viewDidAppear:(BOOL)animated {
|
||||
[super viewDidAppear:animated];
|
||||
if ([[UIDevice currentDevice].systemVersion doubleValue] < 5.0) {
|
||||
[tableController viewDidAppear:animated];
|
||||
}
|
||||
}
|
||||
|
||||
- (void)viewDidDisappear:(BOOL)animated {
|
||||
[super viewDidDisappear:animated];
|
||||
if ([[UIDevice currentDevice].systemVersion doubleValue] < 5.0) {
|
||||
[tableController viewDidDisappear:animated];
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
#pragma mark - UICompositeViewDelegate Functions
|
||||
|
||||
|
|
|
|||
|
|
@ -78,11 +78,7 @@ static UICompositeViewDescription *compositeDescription = nil;
|
|||
|
||||
- (void)viewWillAppear:(BOOL)animated {
|
||||
[super viewWillAppear:animated];
|
||||
|
||||
if ([[UIDevice currentDevice].systemVersion doubleValue] < 5.0) {
|
||||
[tableController viewWillAppear:animated];
|
||||
}
|
||||
|
||||
|
||||
if([tableController isEditing]) {
|
||||
[tableController setEditing:FALSE animated:FALSE];
|
||||
}
|
||||
|
|
@ -100,23 +96,6 @@ static UICompositeViewDescription *compositeDescription = nil;
|
|||
[super viewDidAppear:animated];
|
||||
|
||||
editButton.hidden = ([[tableView dataSource] tableView:tableView numberOfRowsInSection:0] == 0);
|
||||
if ([[UIDevice currentDevice].systemVersion doubleValue] < 5.0) {
|
||||
[tableController viewDidAppear:animated];
|
||||
}
|
||||
}
|
||||
|
||||
- (void)viewDidDisappear:(BOOL)animated {
|
||||
[super viewDidDisappear:animated];
|
||||
if ([[UIDevice currentDevice].systemVersion doubleValue] < 5.0) {
|
||||
[tableController viewDidDisappear:animated];
|
||||
}
|
||||
}
|
||||
|
||||
- (void)viewWillDisappear:(BOOL)animated {
|
||||
[super viewWillDisappear:animated];
|
||||
if ([[UIDevice currentDevice].systemVersion doubleValue] < 5.0) {
|
||||
[tableController viewWillDisappear:animated];
|
||||
}
|
||||
}
|
||||
|
||||
- (void)viewDidLoad {
|
||||
|
|
|
|||
|
|
@ -87,37 +87,20 @@ static UICompositeViewDescription *compositeDescription = nil;
|
|||
[pickerController setDelegate:self];
|
||||
}
|
||||
|
||||
- (void)viewWillAppear:(BOOL)animated {
|
||||
[super viewWillAppear:animated];
|
||||
if ([[UIDevice currentDevice].systemVersion doubleValue] < 5.0) {
|
||||
[pickerController viewWillAppear:animated];
|
||||
}
|
||||
}
|
||||
|
||||
- (void)viewDidAppear:(BOOL)animated {
|
||||
[super viewDidAppear:animated];
|
||||
if(popoverController != nil) {
|
||||
[popoverController presentPopoverFromRect:CGRectZero inView:self.view permittedArrowDirections:UIPopoverArrowDirectionAny animated:FALSE];
|
||||
} else if ([[UIDevice currentDevice].systemVersion doubleValue] < 5.0) {
|
||||
[pickerController viewDidAppear:animated];
|
||||
}
|
||||
[[UIApplication sharedApplication] setStatusBarHidden:NO]; //Fix UIImagePickerController status bar hide
|
||||
[[UIApplication sharedApplication] setStatusBarStyle:UIStatusBarStyleBlackOpaque]; //Fix UIImagePickerController status bar style change
|
||||
}
|
||||
|
||||
- (void)viewDidDisappear:(BOOL)animated {
|
||||
[super viewDidDisappear:animated];
|
||||
if ([[UIDevice currentDevice].systemVersion doubleValue] < 5.0) {
|
||||
[pickerController viewDidDisappear:animated];
|
||||
}
|
||||
}
|
||||
|
||||
- (void)viewWillDisappear:(BOOL)animated {
|
||||
[super viewWillDisappear:animated];
|
||||
if(popoverController != nil) {
|
||||
[popoverController dismissPopoverAnimated: NO];
|
||||
} else if ([[UIDevice currentDevice].systemVersion doubleValue] < 5.0) {
|
||||
[pickerController viewWillDisappear:animated];
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -352,25 +352,13 @@
|
|||
|
||||
+ (void)addSubView:(UIViewController*)controller view:(UIView*)view {
|
||||
if(controller != nil) {
|
||||
if ([[UIDevice currentDevice].systemVersion doubleValue] < 5.0) {
|
||||
[controller viewWillAppear:NO];
|
||||
}
|
||||
[view addSubview: controller.view];
|
||||
if ([[UIDevice currentDevice].systemVersion doubleValue] < 5.0) {
|
||||
[controller viewDidAppear:NO];
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
+ (void)removeSubView:(UIViewController*)controller {
|
||||
if(controller != nil) {
|
||||
if ([[UIDevice currentDevice].systemVersion doubleValue] < 5.0) {
|
||||
[controller viewWillDisappear:NO];
|
||||
}
|
||||
[controller.view removeFromSuperview];
|
||||
if ([[UIDevice currentDevice].systemVersion doubleValue] < 5.0) {
|
||||
[controller viewDidDisappear:NO];
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -96,7 +96,7 @@ static RootViewManager* rootViewManagerInstance = nil;
|
|||
|
||||
}
|
||||
completion:^(BOOL finished) {
|
||||
}];
|
||||
}];
|
||||
}
|
||||
return currentViewController;
|
||||
}
|
||||
|
|
@ -167,9 +167,6 @@ static RootViewManager* rootViewManagerInstance = nil;
|
|||
- (void)viewWillAppear:(BOOL)animated {
|
||||
[super viewWillAppear:animated];
|
||||
|
||||
if ([[UIDevice currentDevice].systemVersion doubleValue] < 5.0) {
|
||||
[mainViewController viewWillAppear:animated];
|
||||
}
|
||||
// Set observers
|
||||
[[NSNotificationCenter defaultCenter] addObserver:self
|
||||
selector:@selector(callUpdate:)
|
||||
|
|
@ -198,10 +195,6 @@ static RootViewManager* rootViewManagerInstance = nil;
|
|||
- (void)viewWillDisappear:(BOOL)animated {
|
||||
[super viewWillDisappear:animated];
|
||||
|
||||
if ([[UIDevice currentDevice].systemVersion doubleValue] < 5.0) {
|
||||
[mainViewController viewWillDisappear:animated];
|
||||
}
|
||||
|
||||
// Remove observers
|
||||
[[NSNotificationCenter defaultCenter] removeObserver:self
|
||||
name:kLinphoneCallUpdate
|
||||
|
|
@ -222,22 +215,8 @@ static RootViewManager* rootViewManagerInstance = nil;
|
|||
|
||||
}
|
||||
|
||||
- (void)viewDidAppear:(BOOL)animated {
|
||||
[super viewDidAppear:animated];
|
||||
if ([[UIDevice currentDevice].systemVersion doubleValue] < 5.0) {
|
||||
[mainViewController viewDidAppear:animated];
|
||||
}
|
||||
}
|
||||
|
||||
- (void)viewDidDisappear:(BOOL)animated {
|
||||
[super viewDidDisappear:animated];
|
||||
if ([[UIDevice currentDevice].systemVersion doubleValue] < 5.0) {
|
||||
[mainViewController viewDidDisappear:animated];
|
||||
}
|
||||
}
|
||||
|
||||
- (void)viewDidUnload {
|
||||
[super viewDidUnload];
|
||||
-(void)viewDidAppear:(BOOL)animated {
|
||||
[super viewDidAppear:animated];
|
||||
}
|
||||
|
||||
- (void)setVolumeHidden:(BOOL)hidden {
|
||||
|
|
|
|||
|
|
@ -351,9 +351,7 @@
|
|||
- (void)pushViewController:(UIViewController *)viewController animated:(BOOL)animated {
|
||||
[UINavigationControllerEx removeBackground:viewController.view];
|
||||
UIViewController *oldTopViewController = self.topViewController;
|
||||
if ([[UIDevice currentDevice].systemVersion doubleValue] < 5.0) {
|
||||
[oldTopViewController viewWillDisappear:animated];
|
||||
}
|
||||
|
||||
[viewController viewWillAppear:animated]; // Force view
|
||||
UILabel *labelTitleView = [[UILabel alloc] init];
|
||||
labelTitleView.backgroundColor = [UIColor clearColor];
|
||||
|
|
@ -367,28 +365,6 @@
|
|||
viewController.navigationItem.titleView = labelTitleView;
|
||||
[labelTitleView release];
|
||||
[super pushViewController:viewController animated:animated];
|
||||
if ([[UIDevice currentDevice].systemVersion doubleValue] < 5.0) {
|
||||
[self.topViewController viewDidAppear:animated];
|
||||
[oldTopViewController viewDidDisappear:animated];
|
||||
}
|
||||
}
|
||||
|
||||
- (UIViewController *)popViewControllerAnimated:(BOOL)animated {
|
||||
if ([[UIDevice currentDevice].systemVersion doubleValue] < 5.0) {
|
||||
[self.topViewController viewWillDisappear:animated];
|
||||
UIViewController *nextView = nil;
|
||||
NSInteger count = [self.viewControllers count];
|
||||
if(count > 1) {
|
||||
nextView = [self.viewControllers objectAtIndex:count - 2];
|
||||
}
|
||||
[nextView viewWillAppear:animated];
|
||||
}
|
||||
UIViewController * ret = [super popViewControllerAnimated:animated];
|
||||
if ([[UIDevice currentDevice].systemVersion doubleValue] < 5.0) {
|
||||
[ret viewDidDisappear:animated];
|
||||
[self.topViewController viewDidAppear:animated];
|
||||
}
|
||||
return ret;
|
||||
}
|
||||
|
||||
- (void)setViewControllers:(NSArray *)viewControllers {
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue