iOS 8 MKAnnotationView rightCalloutAccessoryView misaligned

前端 未结 7 1670
生来不讨喜
生来不讨喜 2020-12-24 01:51

I\'m still pretty new to the iOS stuff in general and found a problem while testing our App for iOS 8 compatibility. In iOS 7 everything worked fine but on iOS 8 the rightCa

相关标签:
7条回答
  • 2020-12-24 02:20

    One curiosity I noticed was that my first callout to be displayed would properly align the accessory views, but subsequent selections would not. I added a call to [view setNeedsLayout] prior to returning the dequeued annotation view, and everything began aligning properly again.

    Without spending more time on this, my best guess is that a re-layout is not being triggered for a view that has been dequeued because the view heirarchy has not changed.

    I highly recommend submitting a radar for this issue though. It should not be necessary to implement workarounds for such a standard use case.

    EDIT:

    While this still appears to be better for many cases, I'm still encountering this issue with annotations whose title is long enough to be truncated.

    0 讨论(0)
提交回复
热议问题