この問題はここ数日私を悩ませてきました。私はこれにあまりにも多くの時間を浪費しているので、今はいらいらしています.
何が起こっているのかを確認するために 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);
}
}
この問題の助けをいただければ幸いです。
さらに情報が必要な場合はお知らせください。
ありがとう
編集:質問が修正されました。