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 Game Development

Reply
 
LinkBack Thread Tools Display Modes
Old 05-11-2010, 05:04 AM   #1 (permalink)
Registered Member
 
Join Date: Dec 2009
Posts: 10
srikanth is on a distinguished road
Post How we should load theMFMailComposeViewController in cocos2d ?

I am writing an app in using cocos2d. This method I have written for the selector goToFirstScreen: . The view is in landscape mode. I need to send an email. So, I need to launch the MFMailComposeViewController. I need it in portrait mode.

But, the control is not entering in to viewDidLoad of the mailMe class. The problem is in goToScreen: method. I do not get how to add the mailME to cocos layer.

-(void)goToFirstScreenid)sender
{

CCScene *Scene = [CCScene node];
CCLayer *Layer = [mailME node];

[Scene addChild:Layer];

[[CCDirector sharedDirector] setAnimationInterval:1.0/60];
[[CCDirector sharedDirector] pushScene: Scene];
}
mailMe is the class in which I wrote the code for mail using MFMailComposeViewController.

Thank you .
srikanth is offline   Reply With Quote
Old 05-20-2010, 10:06 AM   #2 (permalink)
Registered Member
 
Join Date: May 2010
Posts: 16
Maksumko is on a distinguished road
Send a message via ICQ to Maksumko
Default

Hi!
Try like this:
call mail controller:
Code:
MailViewController *mailController = [[MailViewController alloc] init];
mailController.mainScene = self;
[[[Director sharedDirector] openGLView] addSubview:mailController.view];
[mailController showPicker];
MailViewController.h
Code:
#import <UIKit/UIKit.h>
#import <MessageUI/MessageUI.h>
#import <MessageUI/MFMailComposeViewController.h>

@class MainScene;

@interface MailViewController: UIViewController <MFMailComposeViewControllerDelegate> 
{
	MFMailComposeViewController *picker;
	MainScene* mainScene;
}
@property(nonatomic,retain) MainScene* mainScene;

@end
Maksumko is offline   Reply With Quote
Reply

Bookmarks

Tags
cocoa-touch, cocos2d, mfmailcomposecontroller

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: 408
10 members and 398 guests
7twenty7, ChrisYates, djohnson, Duncan C, gmarro, Kirkout, Retouchable, SLIC, walex, xzoonxoom
Most users ever online was 1,387, 04-10-2012 at 04:21 AM.
» Stats
Members: 175,679
Threads: 94,128
Posts: 402,921
Top Poster: BrianSlick (7,990)
Welcome to our newest member, xzoonxoom
Powered by vBadvanced CMPS v3.1.0

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