How to add a custom CalloutView loaded from nib file

前端 未结 2 1346
遇见更好的自我
遇见更好的自我 2021-01-29 04:02

I\'m trying to make a custom Callout view for AnnotationView. I had seen this answer, and seems a good solution (it works). I\'m trying to load a UIView from a nib file, and the

相关标签:
2条回答
  • 2021-01-29 04:58

    The nib for your custom UIView should have a backing UIView class (MyCustomView.h/.m). In Interface Builder you will want to set the custom class value under the identity inspector to your custom class. Once this is done you would hook up the UIButton in the nib to your desired IBAction by dragging the connection (touch up inside likely) from the bottom to the main view under the objects section (NOT the file's owner as you may be used to).

    Hopefully that helps

    ~Good Luck

    0 讨论(0)
  • 2021-01-29 04:59

    I found a solution for my problem: gik-animated-callout

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