HI,
I am new to iphone development.I have created tabbar as programmatically and sets two
view in the tabbar. Now i want to load a email application
view when i clicked the tabbar and it opened and works properly.Then i clicked the next tabbar and come back to the email
view, it doesnot displayed.So i am facing the problem is only one time open my mail application. I want to display the email
view while clicked the tabbar. Now i have written in my code is viewDidLoad. 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.