-
-
Notifications
You must be signed in to change notification settings - Fork 2.7k
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
Only apply orientation fix for iOS 13 #1629
Conversation
@onevcat This may cause some, emm, bad effect :) SwiftUI's |
@dreampiggy Thanks for letting me know it. Sigh. Why am I not surprised at all.. 😂 |
@dreampiggy Tried the identical code in Kingfisher but not reproducible with the Not sure what am I missing here. But I am going to wait and see if there are any reports on this and then give it a fix if necessary then. |
Trying not set renderingMode. Because SwiftUI.Image does not need this modifier, but they can |
Some more results: These behaviors seems to be a little different from the original issue in SDWebImage. (In SDWebImage/SDWebImageSwiftUI#177 , the image is rendered as template even when Without any rendering mode changing, the image is also rendered originally. And both I am going to dig it deeper to see if I can find anything. |
Seems KF works fine on this case. Did you override the original UIImage with The disassemble result shows, if you create the Image with platform UIImage, the platform UIImage will be used to create UIBarButtonItem, then set it into UINavigationViewController. All of this is UIKit-based. If you create Image with CGImage, the Graphics and HostingView will be used to create custom UIBarButton with So differences result the strange behavior. |
No. There is no
Is it opposite? According to your disassembly result: // ....
if let uiImage = platformItem.platformItemImage {
let imageView = UIImageView(image: uiImage)
item = UIBarButtonItem(customView:imageView)
} else if platformItem.decorative {
let image = UIImage(cgImge:platformItem.contents)
let renderingMode = context.flags.renderingMode ?? .alwaysOriginal
let image2 = image.renderingMode(renderingMode)
item = UIBarButtonItem(image: image2, .plain, target, selector))
} else {
let hostingView = context.hostingView
item = UIBarButtonItem(customView:hostView)
} It seems that the Not sure how the |
I didn't yet have a chance to go deep into the assembly code yet. So maybe my understanding on it is totally wrong. I'll check it later when I have more time. |
Only apply orientation fix for iOS 13
No description provided.