11 Mar 2012, 09:21
Bernd Rabe (23 posts)
Hi Matt, Paul,
great work thx. Inspired me in many ways.
Especially the self-contained PRPAlertview.
Tried to do the same with one of my classes and failed - somehow :(
I followed you pattern as follows
The base class is UIViewController which initialized via
within the initAutoreleasedObjectWithArguments method.
The callingViewController is retained, the blocks copied. The present method adds the view to the callingViewControllers view.
When I call
the class is created the user interface presented but the class is immediatly released. If I ommit the autorelease call it is never released.
The only difference to PRPAlertView is the delegate which I haven’t.
Can you see an obvious problem with this construction?
SOLVED Had to keep a reference that was clear but I didn’t know how .. but rtfm (read the … manual) helped me. I simply added my controller as childViewController and during cleanup removeFromParentViewController.
|You must be logged in to comment|