3

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?

Community
  • 1
  • 1
user212541
  • 1,878
  • 1
  • 21
  • 30

2 Answers2

4

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.

Aaron Golden
  • 7,092
  • 1
  • 25
  • 31
0

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.

Community
  • 1
  • 1
iLearner
  • 1,670
  • 2
  • 19
  • 45