1

나는 당신이 isHTML:YES로 메시지 본문을 설정할 수 있습니다 및 사용 라인 <br>을 중단하거나 setMessageBody 문자열에 \n를 사용해보십시오MFMailComposeViewController 하단에 텍스트를 어떻게 추가 할 수 있습니까?

if([MFMailComposeViewController canSendMail]){ 
     MFMailComposeViewController *controller = [[MFMailComposeViewController alloc] init]; 
     controller.mailComposeDelegate = self; 
     [controller setSubject:[NSString stringWithFormat:@"A message from: %@",self.profileName]]; 
     [controller setMessageBody:[NSString stringWithFormat:@"%@",self.cellBody] isHTML:NO]; 
     [self presentModalViewController:controller animated:YES]; 
     [controller release]; 
     } 
     else { 
     UIAlertView *alertView; 
     alertView = [[UIAlertView alloc] initWithTitle:@"E-Mail Not Enabled" message:@"E-Mail is not supported on this device" delegate:self cancelButtonTitle:@"OK" otherButtonTitles:nil]; 
     [alertView show]; 
     [alertView release]; 
     } 

답변

2

메시지의 하단에 "에서 보낸"텍스트를 추가 할

그 다음에 "보낸 사람"메시지를 추가하십시오. 나는 당신의 요구 사항에 따라

if([MFMailComposeViewController canSendMail]){ 
     MFMailComposeViewController *controller = [[MFMailComposeViewController alloc] init]; 
     controller.mailComposeDelegate = self; 
     [controller setSubject:[NSString stringWithFormat:@"A message from: %@",self.profileName]]; 
     [controller setMessageBody:[NSString stringWithFormat:@"%@\nSent from : %@",self.cellBody,self.profileName] isHTML:NO]; 
     [self presentModalViewController:controller animated:YES]; 
     [controller release]; 
     } 
     else { 
     UIAlertView *alertView; 
     alertView = [[UIAlertView alloc] initWithTitle:@"E-Mail Not Enabled" message:@"E-Mail is not supported on this device" delegate:self cancelButtonTitle:@"OK" otherButtonTitles:nil]; 
     [alertView show]; 
     [alertView release]; 
     } 

해피 코딩을하는 코드를 변경 한이 코드를 사용해보십시오

0

...