thii / FontAwesome.swift

Use FontAwesome in your Swift projects
MIT License
1.57k stars 265 forks source link

Rendering images in UIBarItem appears blurry in swift3 branch #115

Closed wyland closed 7 years ago

wyland commented 7 years ago

It appears the implementation of displaying the UIBarItem.image has changed in swift3, any iOS version.

Here is using an FA icon image in a swift2 TabBarItem swift2-tabbaritem

Here is using an FA icon image in swift3 TabBarItem swift3-tabbaritem

At first glance it just appears to be rendering at a lossy compression setting, but trying to adjust the properties of rendering the attributed string into a context has no affect, even rendering as a png produces a blurred image in the bar item.

Are any other users having this problem with the framework? Thanks

wyland commented 7 years ago

After a bit more investigating, I believe this may be a problem with how xcode8 is rendering IBDesignable elements (I am setting these images using a UITabBarItem subclass and an IBInspectable property). I confirmed that setting the tabBar's image programmatically from the viewController correctly renders without the loss in quality. I'll go ahead and close this ticket and keep it around for reference