diff --git a/Classes/CallView.m b/Classes/CallView.m index eb2a182be..b35307aae 100644 --- a/Classes/CallView.m +++ b/Classes/CallView.m @@ -79,9 +79,12 @@ static UICompositeViewDescription *compositeDescription = nil; _routesEarpieceButton.enabled = !IPAD; +// TODO: fixme! video preview frame is too big compared to openGL preview +// frame, so until this is fixed, temporary disabled it. +#if 0 _videoPreview.layer.borderColor = UIColor.whiteColor.CGColor; _videoPreview.layer.borderWidth = 1; - +#endif [singleFingerTap setNumberOfTapsRequired:1]; [singleFingerTap setCancelsTouchesInView:FALSE]; [self.videoView addGestureRecognizer:singleFingerTap]; diff --git a/Classes/LinphoneUI/StatusBarView.m b/Classes/LinphoneUI/StatusBarView.m index b610a9def..fa750a127 100644 --- a/Classes/LinphoneUI/StatusBarView.m +++ b/Classes/LinphoneUI/StatusBarView.m @@ -217,13 +217,14 @@ #pragma mark - - (void)updateUI:(BOOL)inCall { - // nothing changed - if (_outcallView.hidden == inCall) - return; + BOOL hasChanged = (_outcallView.hidden != inCall); _outcallView.hidden = inCall; _incallView.hidden = !inCall; + if (!hasChanged) + return; + if (callQualityTimer) { [callQualityTimer invalidate]; callQualityTimer = nil; diff --git a/Classes/SettingsView.m b/Classes/SettingsView.m index 804505a65..9846a2749 100644 --- a/Classes/SettingsView.m +++ b/Classes/SettingsView.m @@ -282,28 +282,31 @@ INIT_WITH_COMMON_CF { } - (void)pushViewController:(UIViewController *)viewController animated:(BOOL)animated { - // when device is slow and you are typing an item too much, a crash may happen - // because we try to push the same view multiple times - in that case we should - // do nothing but wait for device to respond again. - if (self.navigationController.topViewController == viewController) { - return; + + @try { + [UINavigationControllerEx removeBackground:viewController.view]; + + [viewController view]; // Force view + UILabel *labelTitleView = [[UILabel alloc] init]; + labelTitleView.backgroundColor = [UIColor clearColor]; + labelTitleView.textColor = + [UIColor colorWithRed:0x41 / 255.0f green:0x48 / 255.0f blue:0x4f / 255.0f alpha:1.0]; + labelTitleView.shadowColor = [UIColor colorWithWhite:1.0 alpha:0.5]; + labelTitleView.font = [UIFont boldSystemFontOfSize:20]; + labelTitleView.shadowOffset = CGSizeMake(0, 1); + labelTitleView.textAlignment = NSTextAlignmentCenter; + labelTitleView.text = viewController.title; + [labelTitleView sizeToFit]; + viewController.navigationItem.titleView = labelTitleView; + + [super pushViewController:viewController animated:animated]; + } @catch (NSException *e) { + // when device is slow and you are typing an item too much, a crash may happen + // because we try to push the same view multiple times - in that case we should + // do nothing but wait for device to respond again. + LOGI(@"Failed to push view because it's already there: %@", e.reason); + [self popToViewController:viewController animated:YES]; } - - [UINavigationControllerEx removeBackground:viewController.view]; - - [viewController view]; // Force view - UILabel *labelTitleView = [[UILabel alloc] init]; - labelTitleView.backgroundColor = [UIColor clearColor]; - labelTitleView.textColor = [UIColor colorWithRed:0x41 / 255.0f green:0x48 / 255.0f blue:0x4f / 255.0f alpha:1.0]; - labelTitleView.shadowColor = [UIColor colorWithWhite:1.0 alpha:0.5]; - labelTitleView.font = [UIFont boldSystemFontOfSize:20]; - labelTitleView.shadowOffset = CGSizeMake(0, 1); - labelTitleView.textAlignment = NSTextAlignmentCenter; - labelTitleView.text = viewController.title; - [labelTitleView sizeToFit]; - viewController.navigationItem.titleView = labelTitleView; - - [super pushViewController:viewController animated:animated]; } - (void)setViewControllers:(NSArray *)viewControllers {