이후에 UITextField로 데이터를 보내지 않습니다.이 문제는 지난 며칠 동안 저를 버렸습니다.이 문제는 너무 많은 시간을 낭비하고 있습니다.NSString이 Segue
나는 무슨 일이 일어나고 있는지는 알기 위해 NSLog()를 사용했지만 올바른 것 같지만 왜 데이터를 보내지 않는지 이해할 수 없습니다. PrepareForSegue의 코드는 다음과 같습니다.
- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:id
{
if ([[segue identifier] isEqualToString:@"Confirm"]) {
NSLog(@"Preparing to Segue");
SubmitEventsP2 *subEventVC = segue.destinationViewController;
NSLog(@"Set destination VC to *subEventVC");
NSDate *choice = [ datePick date];
NSLog(@"Assign date from picker to *choice");
NSDateFormatter *format = [[NSDateFormatter alloc] init];
[format setDateFormat:@"dd/MM/yyy HH:mm"];
NSLog(@"Set the format of date and time");
NSString *formatteddate = [format stringFromDate:choice];
NSLog(@"Store the date format in *formatteddate");
[subEventVC setDateField:formatteddate]; //Incompatible pointer types sending "NSString *" to parameter of type "UITextField *"
NSLog(@"Should send the date to the textField");
// NSString *viewchange = @"SubmitEventsP2" ;
NSLog(@"%@",formatteddate);
}
}
이 문제에 대한 도움을 주시면 감사하겠습니다.
자세한 정보가 필요하면 알려주십시오.
감사
편집 : 질문 을 개정 함.
좋아, 답장을 보내 주셔서 너무 빨리, 완료, 나는 너무 많은 실수로 setDateField에 빠뜨린 것 같습니다. 작전 ... 왜 내가 다른 문제가 생겼는지 궁금해. 개정되었습니다. –
답변을 업데이트했습니다. – lnafziger
OK, SubmitEventP2에 getter 메소드가 없습니다. 그것은 내가 뭔가를 위임해야한다는 것을 의미합니까? 나는 이것에 관해 많은 가이드를 보았다. 그리고 나는 혼란 스럽다. –