Forum Xamarin.iOS

iOS icon is rotated by 45 degrees, when the resource should appear upright. Any suggestions?

wellhatwellhat Member ✭✭

Hi all,

I am struggling with this issue and couldn't find a solution online. I've downloaded this resource as an svg, converted it to a pdf, then added it to Assets.xcassets and added it to a UIImageView in my .xib.

For some reason, the icon appears rotated in the .xib. I can't come up with any explanation for this: I've tried creating a new image view, a new .xib, I tried using a .png of the image instead of using a vector pdf, but no matter what I do this thing is still rotated by 45 degrees. Using a different image in the same image view it displays correctly.

I also don't know why it has this grey tint, it doesn't seem to respect the TintColor attribute I set on it, the actual icon is black.

If anybody has any idea what is going wrong, I'd much appreciate some suggestions.

Thanks,

wellhat

Best Answer

  • wellhatwellhat ✭✭
    Accepted Answer

    The solution was to delete the image set and create a new one with a different name than "bell". In Assets.xcassets I removed my own "bell" image set, and it was still using this rotated bell image. Possibly an old asset that is somehow being preserved in our project but not shown in assets.xcassets.

Answers

  • wellhatwellhat Member ✭✭
    edited February 17

    Here is how the icon is incorrectly displayed in the .xib editor and in the app.

  • wellhatwellhat Member ✭✭
    Accepted Answer

    The solution was to delete the image set and create a new one with a different name than "bell". In Assets.xcassets I removed my own "bell" image set, and it was still using this rotated bell image. Possibly an old asset that is somehow being preserved in our project but not shown in assets.xcassets.

Sign In or Register to comment.