困っているか、必要な情報が見つからないだけです。「saveDataround」ボタンを選択したときに配列に保存したいオブジェクトがありますが、オブジェクトにテキストを入力する方法がわかりません」 Round": "Expected identifier" と "Expected , ;" を取得しています。コードの 1 行目と 2 行目にエラーがあります。前もって感謝します。
[NSString *roundChoice = [NSString stringWithFormat:@"Round"];
self.round.text = roundChoice;]
- (IBAction)saveDataround {
NSArray *paths = NSSearchPathForDirectoriesInDomains(NSDocumentDirectory, NSUserDomainMask, YES);
NSString *documentsDirectory = [paths objectAtIndex:0];
NSString *recipient = [NSString stringWithFormat:@"%@/arrayChoiceRound", documentsDirectory];
NSMutableArray *array = [[NSMutableArray alloc] init];
[array addObject:round.text];
[array writeToFile:recipient atomically:NO];
}