My app is View based application. I got 3 viewcontrollers. (main,sub,detail) each viewcontroller has one UIView. in MainViewcontroller, there's a button to launch subView. the method is as below.
-(IBAction) LaunchSubView: (id)sender {
subViewcontroller *viewController = [[subViewcontroller alloc] init];
UIView *currentView = self.view;
[UIView transitionFromView:currentView
toView:viewController.view
duration:0.5
options:UIViewAnimationOptionTransitionFlipFromLeft
completion:^(BOOL finished){}];
}
While i try build and analyze, I got this warning. Potential leak of an object allocated on line 54 and stored into 'viewController' i tried [viewController release] after transitionFromView method and subViewcontroller *viewController = [[[subViewcontroller alloc] init] autorelease]; both ways cause the app crash. any idea what am i suppose to do? thanks in advance for any kind help. =)