I am currently working on an iPad project and have found it. So this is my structure
I have been sub-class as UVIC controller, like it
@protocol was optimized VCDelegate - (zero) viewclosed: ( UIView *) view oldviewcontroller: (UIViewController *) Oldvc newvcname: (UIViewController *) newvc; @end @Interfaces was customized: UIViewController {id - (BOOL) Application: (UIApplication *) application FinishLaunchingWithOptions: (NSDictionary *) launchOptions {// loading openView OpenVC * vc = [[openingVC alloc] InitWithNibName: @ "Inauguration View" bundle: zero]; Vc.delegate = self; [Add windowSubview: vc.view]; [Window-making and knowledgeable]; Yes come back }
To switch the view, I will set the viewClosed to fire in each view controller. For example, I got VC1 and had to switch VC2. I fire a scene in vc1 And since VP1's representative Dempadap is delegate, virtually all VC's representatives are demo-padded delegates therefore demoipadappDelegate will receive the event and will do so. This is in demoipadappDelegate
- (zero) viewclosed: (UIView *) view oldviewcontroller: (UIViewController *) oldvc newvcname: (UIViewController *) newvc; {Self.currentVC = (customizedVC *) newvc; Self.currentVC.delegate = self; [Add window subeview: to. [ViewFromSuperview]; [Old release]; }
I expected that the memory usage would be drop. It was not that I also examined that in every VC, I have already released anything manually i alloc, so this is not the case.
Sorry for my poor English, I hope I have clarified clearly
Are you really using the right cover? The
method is not called removefromsuperview .
Comments
Post a Comment