From 1c7c8d807f8858685c6b8ca23437644686c06909 Mon Sep 17 00:00:00 2001 From: Murat Baysangurov Date: Wed, 13 Sep 2017 16:42:44 +0300 Subject: [PATCH 1/3] Bug with screenshot being behind navigation bar fixed --- Classes/BITFeedbackComposeViewController.m | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/Classes/BITFeedbackComposeViewController.m b/Classes/BITFeedbackComposeViewController.m index 95ad816e..6d51aaac 100644 --- a/Classes/BITFeedbackComposeViewController.m +++ b/Classes/BITFeedbackComposeViewController.m @@ -45,6 +45,10 @@ #import "BITImageAnnotationViewController.h" #import "BITHockeyAttachment.h" +#ifndef __IPHONE_11_0 +#define __IPHONE_11_0 110000 +#endif + @interface BITFeedbackComposeViewController () { } @@ -217,7 +221,7 @@ - (void)viewDidLoad { style:UIBarButtonItemStyleDone target:self action:@selector(sendAction:)]; - + // Container that contains both the textfield and eventually the photo scroll view on the right side self.contentViewContainer = [[UIView alloc] initWithFrame:self.view.bounds]; self.contentViewContainer.autoresizingMask = UIViewAutoresizingFlexibleWidth|UIViewAutoresizingFlexibleHeight; @@ -262,7 +266,11 @@ - (void)viewDidLoad { self.attachmentScrollView.bounces = YES; self.attachmentScrollView.autoresizesSubviews = NO; self.attachmentScrollView.autoresizingMask = UIViewAutoresizingFlexibleHeight|UIViewAutoresizingFlexibleRightMargin; - +#if __IPHONE_OS_VERSION_MAX_ALLOWED >= __IPHONE_11_0 + if (@available(iOS 11.0, *)) { + self.attachmentScrollView.contentInsetAdjustmentBehavior = UIScrollViewContentInsetAdjustmentAlways; + } +#endif [self.contentViewContainer addSubview:self.attachmentScrollView]; } From 9cf323b694c5519d8a60c3f9690757adb8e21381 Mon Sep 17 00:00:00 2001 From: Murat Baysangurov Date: Wed, 13 Sep 2017 16:44:25 +0300 Subject: [PATCH 2/3] Minor warnings fixed --- Classes/BITHockeyManager.m | 2 +- Classes/BITStoreButton.m | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Classes/BITHockeyManager.m b/Classes/BITHockeyManager.m index b1ab64d0..6fd9aca4 100644 --- a/Classes/BITHockeyManager.m +++ b/Classes/BITHockeyManager.m @@ -599,7 +599,7 @@ - (void)pingServerForIntegrationStartWorkflowWithTimeString:(NSString *)timeStri NSDictionary *params = @{@"timestamp": timeString, @"sdk": BITHOCKEY_NAME, @"sdk_version": BITHOCKEY_VERSION, - @"bundle_version": [[NSBundle mainBundle] objectForInfoDictionaryKey:@"CFBundleVersion"] + @"bundle_version": (id)[[NSBundle mainBundle] objectForInfoDictionaryKey:@"CFBundleVersion"] }; NSURLSessionConfiguration *sessionConfiguration = [NSURLSessionConfiguration defaultSessionConfiguration]; diff --git a/Classes/BITStoreButton.m b/Classes/BITStoreButton.m index 834245af..8ac67a3e 100644 --- a/Classes/BITStoreButton.m +++ b/Classes/BITStoreButton.m @@ -211,7 +211,7 @@ - (CGSize)sizeThatFits:(CGSize) __unused size { if ([self.buttonData.label respondsToSelector:@selector(boundingRectWithSize:options:attributes:context:)]) { CGRect calculatedRect = [self.buttonData.label boundingRectWithSize:constr options:NSStringDrawingUsesFontLeading - attributes:@{NSFontAttributeName:self.titleLabel.font} + attributes:@{NSFontAttributeName:(id)self.titleLabel.font} context:nil]; newSize = calculatedRect.size; } else { From 93776a9b283e6d2ed7f24a0c6d6de35905409084 Mon Sep 17 00:00:00 2001 From: Murat Baysangurov Date: Wed, 13 Sep 2017 20:00:10 +0300 Subject: [PATCH 3/3] __IPHONE_11_0 moved to HockeySDKPrivate --- Classes/BITFeedbackComposeViewController.m | 5 ----- Classes/HockeySDKPrivate.h | 4 ++++ 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/Classes/BITFeedbackComposeViewController.m b/Classes/BITFeedbackComposeViewController.m index 6d51aaac..4ede84ae 100644 --- a/Classes/BITFeedbackComposeViewController.m +++ b/Classes/BITFeedbackComposeViewController.m @@ -45,11 +45,6 @@ #import "BITImageAnnotationViewController.h" #import "BITHockeyAttachment.h" -#ifndef __IPHONE_11_0 -#define __IPHONE_11_0 110000 -#endif - - @interface BITFeedbackComposeViewController () { } diff --git a/Classes/HockeySDKPrivate.h b/Classes/HockeySDKPrivate.h index 445dcf1a..968c944b 100644 --- a/Classes/HockeySDKPrivate.h +++ b/Classes/HockeySDKPrivate.h @@ -78,6 +78,10 @@ NSString *BITHockeyMD5(NSString *str); #define __IPHONE_8_0 80000 #endif +#ifndef __IPHONE_11_0 +#define __IPHONE_11_0 110000 +#endif + #ifndef TARGET_OS_SIMULATOR #ifdef TARGET_IPHONE_SIMULATOR