Skip to content
This repository was archived by the owner on Jan 12, 2018. It is now read-only.

Conversation

@WillJonesMagic
Copy link

@WillJonesMagic WillJonesMagic commented Sep 14, 2016

Update for iOS 10.
The original code doesn't work in iOS 10, clip to bounds was set on for the container and switching it off caused issues in landscape.

On iOS 10 the title will be added to the UICollectionView above the AirDrop panel (and everything shifted down by 50px). On iOS 9 and earlier this code behaves exactly as before.

Works in both portrait and landscape, tested on iPhone 6, iOS 10.0.1.

_titleView.translatesAutoresizingMaskIntoConstraints = NO;
[containerView addSubview:_titleView];
if ([[NSProcessInfo processInfo] isOperatingSystemAtLeastVersion:(NSOperatingSystemVersion){.majorVersion = 10}]) {
[contentView setContentInset:UIEdgeInsetsMake(50, 0, 0, 0)];
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Compilation error: No visible @interface for 'UIView' declares the selector 'setContentInset:'

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Missed a cast. Updated.

@an0
Copy link
Owner

an0 commented Sep 17, 2016

Please make it work on iPad. It now crashes.

@WillJonesMagic
Copy link
Author

Ok, working on it.

@WillJonesMagic
Copy link
Author

Ok, the problem I'm having with this is I seem to be unable to make the actionsheet itself large enough. Setting the frame seems to be ignored and by the looks of it sizes are being cascaded down the UI hierarchy. Any ideas?

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants