MFMailComposeViewController die Ausrichtung der Bilder

Entwickle ich eine Universal-app und ich bin der Codierung für iOS6.

Ich bin mit dem imagePickerController um ein Foto zu machen und dann sende ich es als Anhang mit MFMailComposeViewController. Alle, die arbeiten.

Mein problem ist, dass wenn ich schieße ein Bild im portrait-Modus, ist es angezeigt, indem die MFMailComposeViewController im landscape-Modus. Auch, wenn es ankommt am Ziel-E-Mail-Adresse, ist es angezeigt, im landscape-Modus.

Wenn ich Schießen das Bild im landscape-Modus, es wird von der MFMailComposeViewController im landscape-Modus und wenn es ankommt am Ziel-E-Mail-Adresse, ist es angezeigt, im landscape-Modus. Also das ist alles OK.

Ich habe das gleiche Problem auf beiden meiner Geräte testen; ein iPhone5 und ein iPad2.

Wie kann ich ein Bild im Porträt-Modus gelangen Sie an die E-Mail-Ziel im portrait-Modus?

Hier ist, wie ich hinzufügen das Bild, um die E-Mail:

if ( [MFMailComposeViewController canSendMail] )
   {
   MFMailComposeViewController * mailVC = [MFMailComposeViewController new];
   NSArray * aAddr  = [NSArray arrayWithObjects: gAddr, nil];
   NSData * imageAsNSData = UIImagePNGRepresentation( gImag );

   [mailVC setMailComposeDelegate: self];
   [mailVC        setToRecipients: aAddr];
   [mailVC             setSubject: gSubj];
   [mailVC      addAttachmentData: imageAsNSData
                         mimeType: @"image/png"
                         fileName: @"myPhoto.png"];
   [mailVC         setMessageBody: @"Blah blah"
                          isHTML: NO];

   [self presentViewController: mailVC
                      animated: YES
                    completion: nil];
   }
else
   {
   NSLog( @"Device is unable to send email in its current state." );
   }
InformationsquelleAutor Gallymon | 2013-11-25
Schreibe einen Kommentar