im designing a app thats a single view application and i am adding the code so that i can switch views via a button but every-time i enter my code that was working in IOS 5 it now comes up with a error ? heres the code
#import <UIKit/UIKit.h>
@interface ViewController1 : UIViewController
- (IBAction)home:(id)sender;
@end
#import "ViewController1.h"
#import "ViewController.h"
@interface ViewController1 ()
@end
@implementation ViewController1
- (IBAction)home:(id)sender
{
ViewController *second =[[ViewController alloc] initWithNibName:nil bundle:nil];
[self presentModalViewController:second animated:YES];
}
heres the error
thank you!! edited answers my errors now ??
by the way i really appreciate it and i will give you good tick by your answer once done this is the errors now??
First of all, this is not an error but it is warning.
And for help you can read the documents provided by Apple.
And to remove that warning just use the below code
[self presentViewController:second animated:YES completion:^{ }];