문제

In mapkit callouts, we have the possibility to add images to the left and right accessories of callout.

In IOS7, if those accessories are buttons, it seems that the expected format is the same as for toolbar or tab bar buttons. The picture below shows the difference between IOS6 and IOS7.

link to image

Does anyone know how to keep the same behavior in IOS7?

Changing the button type does not help:

for example, UIButtonTypeCustom does not show image at all.

도움이 되었습니까?

해결책

In IOS 7 you have to use the new routine to re-render your image as the original otherwise it just uses it as a template giving you blue blobs as you can see in your pics ... here is the call.

    image = [image imageWithRenderingMode:UIImageRenderingModeAlwaysOriginal];
라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top