Closed himaratsu closed 5 years ago
@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.
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;
}
@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.
@adamdahan saw that you moved it to done. I'm curious what was the fix for iOS 13. Facing the same issue.
@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.
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.
please merge this fix, I can't build my project anymore @danieldahan
@22Round Try Material 3.1.8. Thank you!
@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.
@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
Hi!
in Xcode 11, we can't build app using Material. Error message is here:
Do you have any plan to support this? Thanks.