0
我的應用程序處於橫向模式,當我打開電子郵件工作表時,即縱向 - 及其確定,鍵盤橫向打開,因此我有縱向電子郵件表和橫向鍵盤。電子郵件鍵盤在橫向?
我該如何解決它,鍵盤將在肖像也? 爲什麼按「取消」時,它不會回到應用程序,什麼都沒有發生?
//send email log-------------------------
NSLog(@"mail");
[[CCDirector sharedDirector] pause];
picker = [[MFMailComposeViewController alloc] init];
picker.mailComposeDelegate = self;
//Fill in the email as you see fit
NSArray *toRecipients = [NSArray arrayWithObject:@"[email protected]"];
[picker setToRecipients:toRecipients];
NSArray *paths = NSSearchPathForDirectoriesInDomains(NSDocumentDirectory, NSUserDomainMask, YES);
NSString *dataPath = [[paths objectAtIndex:0] stringByAppendingPathComponent:@"BetaTest.txt"];
NSData *data = [NSData dataWithContentsOfFile:dataPath];
[picker addAttachmentData:data mimeType:@"text/txt" fileName:@"BetaTest.txt"];
NSString *emailBody = @"test :) ";
[picker setMessageBody:emailBody isHTML:NO];
[picker setSubject:@"hardware test##"];
//display the view
[[[CCDirector sharedDirector] openGLView] addSubview:picker.view];
[[CCDirector sharedDirector] stopAnimation];