uibutton - How to customize the calloutAccessoryView of a MKAnnotationView under iOS7? -
Under IOS6 I did the following to set a custom image for the right callout secondary view button:
UIButton * rightButton = [system with UIButton buttons: UIButtonTypeDetailDisclosure]; [right button set image: [UIImage imageNamed: @ "detaildisclosurebutton.png"] forState: UIControlStateNormal]; Annotation View.rightCalloutAccessoryView = rightButton; It worked very well Now I'm updating the app to iOS 7 and I'm just getting a blue circle:
When I replace the image with a square image, it becomes a square but it is also blue.
It looks like tintcolor I tried to set it to zero I also tried to use with the button Type: UIButtonTypeCustom As buttonType , but there is no success. Is there a solution for this?
Button type UIButtonTypeDetailDisclosure tints the image by default instead of < code> UIButtonTypeCustom . If you really need the UIButtonTypeDetailDisclosure (and I can not think of a reason why you gave it a custom image, Always use the original "rendering mode: [[UIImage imageNamed: @" detaildisclosurebutton.png "] Image with Image: UIImageRenderingModeAlwaysOriginal] < / Html>
Comments
Post a Comment