Skip to content
This repository has been archived by the owner on Feb 19, 2020. It is now read-only.

Commit

Permalink
Merge pull request #459 from bmourat/fix/screenshot-bug-ios-11
Browse files Browse the repository at this point in the history
Fix screenshot bug in ios 11
  • Loading branch information
Benjamin Scholtysik (Reimold) authored Sep 14, 2017
2 parents d70a42a + 93776a9 commit a16ddd3
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 5 deletions.
9 changes: 6 additions & 3 deletions Classes/BITFeedbackComposeViewController.m
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,6 @@
#import "BITImageAnnotationViewController.h"
#import "BITHockeyAttachment.h"


@interface BITFeedbackComposeViewController () <BITFeedbackUserDataDelegate, UIImagePickerControllerDelegate, UINavigationControllerDelegate, UIActionSheetDelegate, BITImageAnnotationDelegate> {
}

Expand Down Expand Up @@ -217,7 +216,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;
Expand Down Expand Up @@ -262,7 +261,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];
}

Expand Down
2 changes: 1 addition & 1 deletion Classes/BITHockeyManager.m
Original file line number Diff line number Diff line change
Expand Up @@ -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];
Expand Down
2 changes: 1 addition & 1 deletion Classes/BITStoreButton.m
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down
4 changes: 4 additions & 0 deletions Classes/HockeySDKPrivate.h
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit a16ddd3

Please sign in to comment.