how to programmatically fake a touch event to a UIButton?

后端 未结 8 1849
余生分开走
余生分开走 2020-11-29 15:48

I\'m writing some unit tests and, because of the nature of this particular app, it\'s important that I get as high up the UI chain as possible. So, what I\'d l

8条回答
  •  独厮守ぢ
    2020-11-29 16:16

    For Xamarin iOS

    btnObj.SendActionForControlEvents(UIControlEvent.TouchUpInside);
    

    Reference

提交回复
热议问题