It is always inconvenient to use UIPopoverController with a hierarchy of view controllers like UIViewController(parent) > UIPopoverController > UINavigationController > UIViewController.
Also, chances are high that several popovers need to be book kept and displayed at the same time. Most of the time the same bundle of codes are copied and pasted everywhere from this class to another class. The same pattern of variables declaration/@properties/retain/@synthesize/release cannot be eliminated.
What is the good OOP pattern to simplify the management of UIPopoverController? Like a factory?
You could subclass the
UIPopoverController(likeMyPopover) and add all the standard code you want. Then create subclasses ofMyPopoverwhere you only add the specific code.However, I would predict that this will not reduce the kind of redundancy you mean by much. THe reason is that the things you mention (properties, retains, synthesize, release etc.) are really standard code blocks that might seem verbose but are actually quite elementary to any class. Yes, Objective-C is “verbose”, if you will, but not redundant in the OOP sense.