+ Some iOS6 Fixes.

This commit is contained in:
moritz haarmann
2014-04-28 13:59:36 +02:00
parent 409f9541ef
commit 59216cde17
3 changed files with 16 additions and 16 deletions

View File

@@ -180,7 +180,9 @@
UIColor *color = [self colorAtPoint:point]; UIColor *color = [self colorAtPoint:point];
CGFloat alpha, white; CGFloat alpha, white;
[color getWhite:&white alpha:&alpha]; [color getWhite:&white alpha:&alpha];
if (white || alpha){ NSLog(@"%f %f", alpha,white);
if ((int)white > 0 || (int)alpha > 0){
return self; return self;
} else { } else {
return nil; return nil;

View File

@@ -177,13 +177,17 @@
- (void)tapped:(UITapGestureRecognizer *)tapRecognizer { - (void)tapped:(UITapGestureRecognizer *)tapRecognizer {
if (self.navigationController.navigationBarHidden){ if (self.navigationController.navigationBarHidden){
[[UIApplication sharedApplication] setStatusBarHidden:NO]; [UIView animateWithDuration:0.35f animations:^{
[self.navigationController setNavigationBarHidden:NO animated:YES]; [[UIApplication sharedApplication] setStatusBarHidden:NO];
[self.navigationController setNavigationBarHidden:NO animated:NO];
} completion:nil];
} else { } else {
[self.navigationController setNavigationBarHidden:YES animated:YES]; [UIView animateWithDuration:0.35f animations:^{
[[UIApplication sharedApplication] setStatusBarHidden:YES]; [[UIApplication sharedApplication] setStatusBarHidden:YES];
[self.navigationController setNavigationBarHidden:YES animated:NO];
} completion:nil];
} }
[self layoutViews]; [self layoutViews];
} }

View File

@@ -308,23 +308,17 @@ typedef NS_ENUM(NSInteger, BITImageAnnotationViewControllerInteractionMode) {
-(void)tapped:(UIGestureRecognizer *)tapRecognizer { -(void)tapped:(UIGestureRecognizer *)tapRecognizer {
if (self.navigationController.navigationBarHidden){ if (self.navigationController.navigationBarHidden){
[UIView animateWithDuration:0.35f animations:^{ [UIView animateWithDuration:0.35f animations:^{
self.navigationController.navigationBar.alpha = 1; [[UIApplication sharedApplication] setStatusBarHidden:NO];
[self.navigationController setNavigationBarHidden:NO animated:NO];
} completion:^(BOOL finished) { } completion:^(BOOL finished) {
[self fitImageViewFrame]; [self fitImageViewFrame];
[self.navigationController setNavigationBarHidden:NO animated:NO];
[[UIApplication sharedApplication] setStatusBarHidden:NO];
}]; }];
} else { } else {
[UIView animateWithDuration:0.35f animations:^{ [UIView animateWithDuration:0.35f animations:^{
self.navigationController.navigationBar.alpha = 0;
} completion:^(BOOL finished) {
[self.navigationController setNavigationBarHidden:YES animated:NO];
[[UIApplication sharedApplication] setStatusBarHidden:YES]; [[UIApplication sharedApplication] setStatusBarHidden:YES];
[self.navigationController setNavigationBarHidden:YES animated:NO];
} completion:^(BOOL finished) {
[self fitImageViewFrame]; [self fitImageViewFrame];
}]; }];
} }