is there a way NOT to have the popover dismissed when pressing outside it?

后端 未结 3 1463
执笔经年
执笔经年 2020-12-29 14:14

I know the SDK documentation says

Taps outside of the popover’s contents automatically dismiss the popover.

But I\'m sure the s

3条回答
  •  独厮守ぢ
    2020-12-29 14:35

    You need to set the passthroughViews property. From the documentation:

    An array of views that the user can interact with while the popover is visible.

    @property (nonatomic, copy) NSArray *passthroughViews

    When a popover is active, interactions with other views are normally disabled until the popover is dismissed. Assigning an array of views to this property allows taps outside of the popover to be handled by the corresponding views.

    Set passthroughViews to an array of view(s) that you want to handle the touch event instead of just dismissing the popover.

提交回复
热议问题