我只是想知道如何将这些数据存储在具有相同输出的 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];