3
votes

I saw this question here (How to create popover in iPhone app?), and wanted to design a class that could create a popover object, I find all the libraries for popovers right now aren't doing quite what I'd like to do.

So I figure I'll create my own, but I'm a little new at it. Do I subclass UIView directly? Could anyone point me in the right direction for this task?

2

2 Answers

4
votes

Subclass UIView. Implement the layerClass class method of your custom UIView subclass and return [CAShapeLayer class] (from the QuartzCore framework), or use your own subclass of CAShapeLayer instead of CAShapeLayer itself. In your UIView subclass' implementation of initWithFrame: you can set the view's layer's path to get the popover shape you want to display.

0
votes

Creating a popover by subclassing is one of the way to achieve your goal, even its a simple matter of doing google as there are may solutions on StackOverflow about the same.

Take a look at this answer This will help you to proceed.