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.
Related
I'm using the following code to show in-app sms. My app don't have a status bar. (I'm using 320x480 pixels screen in portrait view).
the problem is that when I load the controller, the screen becomes black as you can see from the image...
http://desmond.imageshack.us/Himg211/scaled.php?server=211&filename=schermata092456187alle1.png&res=landing
this is the code:
MFMessageComposeViewController *picker = [[MFMessageComposeViewController alloc] init];
picker.messageComposeDelegate = self;
picker.recipients = [NSArray arrayWithObject:#"123456789"]; // your recipient number or self for testing
picker.body = #"test";
[self presentModalViewController:picker animated:YES];
Testing the MFMessageComposeViewController is currently not supported in the simulator. The MFMailComposeViewController is though.
Try out your code on an actual device and it will work.
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.
i'm using UIImagePickerControllerSourceTypeCamera in my app, but a want to add the camera view a subview. not as modal view.
now i'm using
UIImagePickerController * picker = [[UIImagePickerController alloc] init];
picker.sourceType = UIImagePickerControllerSourceTypeCamera;
picker.delegate = self;
[self presentModalViewController:picker animated:YES];
i want to use it like this, but doesn't seem to work ..
UIImagePickerController * picker = [[UIImagePickerController alloc] init];
picker.sourceType = UIImagePickerControllerSourceTypeCamera;
picker.delegate = self;
[picker.view setFrame:CGRectMake(300, 40, 300, 200)];
[self.view addSubview:picker.view];
i know that the UIImagePickerControllerSourceTypeCamera only can be used as modal view.
How is for example Hipstamatic using this for example?
This is possible in iOS 4+ using the AVCaptureSession framework. It's much more complicated than using UIImagePickerController, but you have complete control over input and output. The key to having the camera view as a subview is the following code. Assume you have a subview called previewView that you want to show the camera view:
AVCaptureSession *session = [[AVCaptureSession alloc] init];
AVCaptureVideoPreviewLayer *previewLayer = [AVCaptureVideoPreviewLayer layerWithSession:session];
previewLayer.frame = self.previewView.bounds;
[self.previewView.layer addSublayer:previewLayer];
There is more setup work to do to give your AVCaptureSession object the correct input and output devices and to actually capture the photos. That can be found in the documentation and examples on the web.
You're right, the only supported methods for displaying a UIImagePickerController seem to be presentModalViewController:animated: or UIPopoverController.
I'm not familiar with Hipstamatic, but chances are it is using AVFoundation, in particular AVCaptureVideoPreviewLayer.
Visit link to get idea how things can be accomplished. Look out for AVCam Demo in developer.apple.com resources for IOS programme. You will definitely get idea how it works. You should be registered developer with APPLE, and thats very easy.
Hope it helps.
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 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]];