HI,
I am new to iphone development.I have created the tabbar programmatically and sets five views in the tabbar. Now i want to load an email application view when i clicked the tabbar.This works properly.When i clicked the next tabbar and come back to the email view, i am able to see the normal view and not the Email view.Only one time i am able to see my mail application.I have mail application in the viewDidLoad method. So please guide me.
Here is my code,
- (void)viewDidLoad {
[super viewDidLoad];
MFMailComposeViewController *mail = [[MFMailComposeViewController alloc] init];
mail.mailComposeDelegate = self;
if ([MFMailComposeViewController canSendMail]) {
[mail setToRecipients:[NSArray arrayWithObjects:@"[email protected]",nil]];
[mail setSubject:@"Title"];
[self presentModalViewController:mail animated:NO];
}
[mail release];
}
Thanks.