achu
achu

Reputation: 1

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

I am new to iPad application and trying to place a popover, can I place use button as a view for popover?

Thanks in advance.

Upvotes: 0

Views: 179

Answers (2)

Jasarien
Jasarien

Reputation: 58448

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.

Upvotes: 1

Erik B
Erik B

Reputation: 42554

A button is a view, so why not?

Upvotes: 2

Related Questions