1

このデータを同じ出力で plist に保存する方法を考えていました。現在、NSObject を使用しています。これらを別の辞書に保存しますか?しかし、どうすればそれらを呼び出して tableData 配列を埋めることができますか。

Exercises *exercise1 = [Exercises new];
exercise1.name = @"Barbell Rollouts";
exercise1.materials = @"30 min";
exercise1.imageFile = @"BarbellRollouts.jpg";
exercise1.sets = @"2";
exercise1.reps = @"10";
exercise1.instructions = @"Hello";
exercise1.status = @"Dynamic";

Exercises *exercise2 = [Exercises new];
exercise2.name = @"Barbell Trunk Rotation";
exercise2.materials = @"30 min";
exercise2.imageFile = @"BarbellTrunkRotation.jpg";
exercise2.sets = @"2";
exercise2.reps = @"10";
exercise2.instructions = @"";
  exercise2.status = @"Dynamic";

Exercises *exercise3 = [Exercises new];
exercise3.name = @"Bent Knee Leg Raises";
exercise3.materials = @"30 min";
exercise3.imageFile = @"BentKneeLegRaises.jpg";
exercise3.sets = @"2";
exercise3.reps = @"10";
exercise3.instructions = @"";
  exercise3.status = @"Dynamic";

Exercises *exercise4 = [Exercises new];
exercise4.name = @"Bicycle Manouver";
exercise4.materials = @"30 min";
exercise4.imageFile = @"BicycleManouver.jpg";
exercise4.sets = @"2";
exercise4.reps = @"10";
exercise4.instructions = @"";
  exercise4.status = @"Dynamic";

Exercises *exercise5 = [Exercises new];
exercise5.name = @"Boat Pose";
exercise5.materials = @"30 min";
exercise5.imageFile = @"BoatPose.jpg";
exercise5.sets = @"2";
exercise5.reps = @"10";
exercise5.instructions = @"";
  exercise5.status = @"Static";

Exercises *exercise6 = [Exercises new];
exercise6.name = @"Bosu Boat Pose";
exercise6.materials = @"30 min";
exercise6.imageFile = @"BosuBoatPose.jpg";
exercise6.sets = @"2";
exercise6.reps = @"10";
exercise6.instructions = @"";
  exercise6.status = @"Static";


tableData = [NSArray arrayWithObjects:exercise1,exercise2,exercise3,exercise4,exercise5,exercise6,nil];
4

1 に答える 1