i want to change the navigation bar of MFMailComposeViewController to black color.
how can i change.
Note that MFMailComposeViewController inherits from UINavigationController so it also has navigationBar property.
MFMailComposeViewController *picker = [[MFMailComposeViewController alloc] init];
picker.navigationBar.barStyle = UIBarStyleBlack;
I know this post is quite dated but for someone who might find it useful, try:
MFMailComposeViewController *mailController = [MFMailComposeViewController new];
[mailController.navigationBar setTintColor:[UIColor colorWithHue:240.0f/359.0f
saturation:85.0f/100.0f
brightness:60.0f/100.0f
alpha:0.0f]];
Related
I want to create a simliar effect for ipad in xcode as shown in following link, can any one guide.
http://tutorials.flashmymind.com/2009/04/flash-mouse-trailer-with-stars/
-(IBAction)SendEmail{
MFMailComposeViewController *picker = [[MFMailComposeViewController alloc] init];
picker.mailComposeDelegate = self;
[picker setSubject:#"Hello from xCode!"];
Regards.
Mouse trails don't even make sense on an iPad. There is no cursor.
I am writing an iPad app and want to put an option on the home screen (root view controller) to allow users to e-mail feedback. I would like the mail to appear with the style "UIModalPresentationFormSheet". However, when I run the code, it appears full screen. What am I doing wrong? Here is the code I am using:
MFMailComposeViewController *picker = [[MFMailComposeViewController alloc] init];
picker.mailComposeDelegate = self;
NSArray *toAddresses = [[NSArray alloc] initWithObjects:#"user#domain.com", nil];
[picker setToRecipients:toAddresses];
[toAddresses release];
[picker setSubject:#"App Feedback"];
self.modalPresentationStyle = UIModalPresentationFormSheet;
[self presentModalViewController:picker animated:YES];
[picker release];
You must set the style of the viewController being presented, not on the one presenting it.. So set the property of the MFMailComposeViewController and you should be ok.
You need to set modalPresentationStyle on your new view controller, not self.
Does anyone have an example of tell me how I might open up the ABPeoplePickerNavigationController inside a popover. I have the NavigationController that is being used in the popover doing the opening, but it opens up full screen/modal.
Am I missing something here or will I need to write my own people picker to show it in the popover?
Thanks,
Create your UIPopoverController, then add an ABPeoplePickerNavigationController.
ABPeoplePickerNavigationController *contacts = [[ABPeoplePickerNavigationController alloc] init];
self.popoverController = [[UIPopoverController alloc] initWithContentViewController:contacts];
Does anyone have any ideas on the right way to do this? There is one answer to a similar question on here, but it's so convoluted, I can't imagine it being right. There has to be an easier way to just show the keyboard when this modal view pops up. right?
MFMailComposeViewController *picker = [[MFMailComposeViewController alloc] init];
picker.mailComposeDelegate = self;
[picker setSubject:#"Mail subject"];
[picker setToRecipients:[NSArray arrayWithObjects:#"email#email.com",nil]];
I am sending email from my iPhone application. Everything working fine, but I want to change the color of the title bar that appears from blue to black and the background color from white to black. Also, all the text to white color.
What should I do? Anyone please help!
I used the below code:
- (IBAction)sendMail{
MFMailComposeViewController *mailComposer = [[MFMailComposeViewController alloc]init];
mailComposer.mailComposeDelegate = self;
if([MFMailComposeViewController canSendMail]){
[mailComposer setToRecipients: [NSArray arrayWithObjects:#"myemail#gmail.com",nil]];
[mailComposer setSubject: nil];
[mailComposer setMessageBody: nil isHTML:NO];
[self presentModalViewController:mailComposer animated: YES];
}
For changing the navigation bar color , Try this
[[mailComposer navigationBar] setTintColor:[UIColor blackColor]];
I dont know about other two.
All The Best.
You can't change the style of MFMailComposeViewController.
Of course you can change it by tweaking the subviews of mailComposer.view, but I don't guarantee Apple will accept this.