I’m new in programming, and I studied Xcode a bit (version 4.2). There, if you chose for example a new single view application, it would create correspondind viewController.m file with methods, like:
-(void)viewDidUnload
- (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation
and so on.
But now I have downloaded Xcode 4.5, created a new a new single view application, and in the corresponding viewController.m file there are only 3 methods:
-(void)viewDidLoad
-(void)didReceiveMemoryWarning
-(void)dealloc
and that’s all. How can I add all that methods autommatically when a new viewController.m file is created?
These methods are not added because they are deprecated in iOS6. Instead of using
- (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientationyou should override these:- (NSUInteger)supportedInterfaceOrientationsand-(UIInterfaceOrientation)preferredInterfaceOrientationForPresentationAs concerning viewDidLoad – views are no longer purged under low-memory conditions and so this method is never called