2013-09-24 3 views
-1

안녕하세요, iOS SDK를 처음 사용하고 이름, 주소, 이메일 등으로 기본 문의 양식을 만들려고 노력 중입니다 ... 여기까지 내가 한 일이 여기에 있습니다.iOS 문의 양식 문제

'- (void)viewDidLoad 
{ 
    [super viewDidLoad]; 
// Do any additional setup after loading the view, typically from a nib. 
} 

- (void)didReceiveMemoryWarning 
{ 
    [super didReceiveMemoryWarning]; 
// Dispose of any resources that can be recreated. 
} 
- (IBAction)emailButton:(id)sender { 
MFMailComposeViewController *mailContoller = [[MFMailComposeViewController alloc]init]; 
[mailContoller setMailComposeDelegate:self]; 
NSString *email = @"******@gmail.com"; 
NSString *email1 = @"*******@hotmail.co.uk"; 
NSArray *emailArray = [[NSArray alloc]initWithObjects:email, email1, nil]; 
NSString *message = [[self myTextView]text]; 
[mailContoller setMessageBody:message isHTML:NO]; 
[mailContoller setToRecipients:emailArray]; 
[mailContoller setSubject:@"IT WORKS!"]; 
[self presentViewController:mailContoller animated:YES completion:nil]; 
} 

-(void)touchesBegan:(NSSet *)touches withEvent:(UIEvent *)event 
{ 
    [[self myTextView] resignFirstResponder]; 
} 
-(void)mailComposeController:(MFMailComposeViewController *)controller     didFinishWithResult:(MFMailComposeResult)result error:(NSError *)error 
{ 
[self dismissViewControllerAnimated:YES completion:nil]; 
} 
@end 

난 데 문제는 내가 이메일을 통해 함께 전송됩니다 여러 텍스트 필드를 만드는 방법을 알고하지 않는 것입니다. 감사와 도움을 크게 주시면 감사하겠습니다.

+0

안녕하세요, 답장을 보내 주셔서 감사하고, 문제는 내가 답장을 문자열 – ash

답변

0

텍스트 필드의 문자열을 연결하기 만하면됩니다.

NSString *message = [NSString stringWithFormat:@"%@\n%@\n%@", 
    textField1.text, textField2.text, textField3.text]; 
+0

안녕하세요, 감사을 연결하고 문제가 내가을 연결 얼마나 엑스 코드 여전히 아주 새로운 메신저입니다 얼마나 Xcode를 매우 새로운 정지 화상이다 문자열. – ash

+0

흠. 예제 코드에서 문자열을 연결하는 방법을 보여주었습니다. 체크 표시를하고 프로그래밍에 관한 좋은 기본 텍스트 북을 읽으십시오. 감사. – Mundi