Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Any plan to support Xcode 11? #1250

Closed
himaratsu opened this issue Aug 5, 2019 · 11 comments
Closed

Any plan to support Xcode 11? #1250

himaratsu opened this issue Aug 5, 2019 · 11 comments

Comments

@himaratsu
Copy link

Hi!

in Xcode 11, we can't build app using Material.
Error message is here:

*** Assertion failure in -[_UINavigationBarContentView setLayoutMargins:], /BuildRoot/Library/Caches/com.apple.xbs/Sources/UIKitCore_Sim/UIKit-3899.8.4/_UINavigationBarContentView.m:703
*** Terminating app due to uncaught exception 'NSInternalInconsistencyException', reason: 'Client error attempting to change layout margins of a private view'

Do you have any plan to support this? Thanks.

@daniel-jonathan
Copy link
Member

@himaratsu Yes, there are always plans to support the latest from Apple. Because it is beta, we usually wait until it is closer to release, or released. That said, we will most likely make a branch for it and help users to start exploring iOS 11 with Material. I will leave this issue up, and tackle that for you later this week. Thank you for sharing your question.

@nguyenbao95
Copy link

I've spent much time on the same issue and have come up with a workaround that works for me and I think it will help you as well.

On iOS 13, changing layout margins of a private view is not allowed. So, expanding the frame to eliminate the layout margins can be an alternative solution.

if (@available(iOS 13.0, *)) {
    UIEdgeInsets margins = view.layoutMargins;
    CGRect frame = view.frame;
    frame.origin.x = -margins.left;
    frame.origin.y = -margins.top;
    frame.size.width += (margins.left + margins.right);
    frame.size.height += (margins.top + margins.bottom);
    view.frame = frame;
}
else {
    view.layoutMargins = UIEdgeInsetsZero;
}

@adamdahan
Copy link
Contributor

@nguyenbao95 @himaratsu Thank you for the support!

We are getting ready to roll out updates for iOS 13 and supper Xcode 11 in the next few weeks.

@mrtsamma
Copy link

@adamdahan saw that you moved it to done. I'm curious what was the fix for iOS 13.
Facing the same issue.

@adamdahan
Copy link
Contributor

@mrtsamma You are correct. :) I realize now this ticket was visibility for others on the iOS 13 topic. Reopening issue until we release the IOS 13 patch.

@adamdahan adamdahan reopened this Sep 11, 2019
@mrtsamma
Copy link

Ok, @nguyenbao95 answare suits for me with a small change(thanks):

for view in subviews {
    if #available(iOS 13.0, *) {
        let margins = view.layoutMargins
        var frame = view.frame
        frame.origin.x = -margins.left
        frame.size.width += (margins.left + margins.right)
        view.frame = frame
    } else {
        view.layoutMargins = .zero
    }
}

I don't need and can't to change height nor y pos.

@phlippieb
Copy link
Contributor

#1269

@22Round
Copy link

22Round commented Sep 23, 2019

please merge this fix, I can't build my project anymore @DanielDahan

@daniel-jonathan
Copy link
Member

@22Round Try Material 3.1.8. Thank you!

@Hamza123Imran
Copy link

@mrtsamma where have you placed this your code? I have upgraded to xcode 11.3 i'm getting same crash. how i can i recover from it.

@Hamza123Imran
Copy link

@adamdahan have your lib updated for 11.3 and iOS 13 version, if so please let me know the link or pods i'm facing an issue

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

No branches or pull requests

8 participants