开发者

Is it possible to place a button instead of view in a UIPopoverController?

开发者 https://www.devze.com 2023-03-01 11:20 出处:网络
I am new to iPad app开发者_如何转开发lication and trying to place a popover, can I place use button as a view for popover?

I am new to iPad app开发者_如何转开发lication and trying to place a popover, can I place use button as a view for popover?

Thanks in advance.


A button is a view, so why not?


With regard to your comment on Erik B's answer:

If you read the method name: initWithContentViewController: and then read the error message that it must not be called with nil as an argument, you should arrive at your problem.

The popover controller expects you to pass in a valid view controller instance. If you want the view of your view controller to be a button, that's a not a problem, but you must provide a view controller to the popover controller.

0

精彩评论

暂无评论...
验证码 换一张
取 消