Advertise Mobile SDKs Books Events Forum News Social Networking Support Us
Follow @iphonedevsdk on Twitter

Interface 2, Advanced iOS
Mockup & Code Gen
($9.99)

Make your own iPhone apps
and run them live!
(free)

Pic Frame Dynamo: Photo Editing
($0.99)

Abiliator
($1.99)

Want your application or service advertised on iPhone Dev SDK?

Go Back   iPhone Dev SDK Forum > iPhone SDK Development Forums > iPhone SDK Development > iPhone SDK Development - Advanced Discussion

Reply
 
LinkBack Thread Tools Display Modes
Old 03-23-2011, 08:46 PM   #1 (permalink)
ppn
Registered Member
 
Join Date: Oct 2010
Posts: 45
ppn is on a distinguished road
Default MFMailComposeViewController

I have a Navigation View with a tab bar delegate so basically it has tab bars and a navigation bar. I'm trying to implement a "Refer a Friend" button where the user will click the button and a mail view will pop up. I'm using the MFMailComposeViewController but my navigation bar is covering the navigation bar for the mail composer so I can't click on the "Cancel" and "Send" button. I tried both self.navigationController.navigationBarHidden = YES and [[self navigationController] setNavigationBarHidden:YES animated:NO] but the navigation bar just won't go away. Anyone have suggestions for this? Do I need to send the mail controller view to the front to hide the navigation bar for my view controller?


Code:
        self.navigationController.navigationBarHidden = YES;
		MFMailComposeViewController *controller = [[MFMailComposeViewController alloc] init];
		[controller setToRecipients:recipient];
		[controller setSubject:subject];
		[controller setMessageBody:message isHTML:NO];
        controller.modalTransitionStyle = UIModalTransitionStyleFlipHorizontal;
		[self presentModalViewController:controller animated:YES];
		[controller release];
ppn is offline   Reply With Quote
Old 04-02-2011, 11:04 PM   #2 (permalink)
Registered Member
 
Join Date: Feb 2011
Posts: 122
architectpianist is on a distinguished road
Default

I just tried it, and it worked for me. Only thing I can think of is if the view controller you're calling presentModalViewController from doesn't own the navigation controller. It might have to do with how your view is structured - whether you have a navigation controller with a tab bar in it, or a tab bar with a navigation controller in it.
You shouldn't have to send it to the front, though - it is a modal view controller, after all.
architectpianist is offline   Reply With Quote
Old 04-03-2011, 04:52 PM   #3 (permalink)
ppn
Registered Member
 
Join Date: Oct 2010
Posts: 45
ppn is on a distinguished road
Default

Yea, I fixed it. Basically I have a tab bar view, which will add 3 other subviews and when I try calling the MFMailComposer from the subview, it won`t take up the whole screen. I changed it to call from the tab bar view and it adds it properly now.
ppn is offline   Reply With Quote
Reply

Bookmarks

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



» Advertisements
» Online Users: 381
14 members and 367 guests
baja_yu, checkright, Duncan C, epaga, fvisticot, Meoz, mer10, Newbie123, Objective Zero, Punkjumper, reficul, rraagg, sacha1996, skrew88
Most users ever online was 1,387, 04-10-2012 at 04:21 AM.
» Stats
Members: 175,642
Threads: 94,110
Posts: 402,857
Top Poster: BrianSlick (7,990)
Welcome to our newest member, pinacate
Powered by vBadvanced CMPS v3.1.0

All times are GMT -5. The time now is 04:29 PM.
Powered by vBulletin® Version 3.8.0
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.3.0