【发布时间】:2016-12-09 09:48:27
【问题描述】:
我有一个名为 Student 的对象数组。每个 Student 都有另一个名为 Subject 的对象数组。现在我想用 Subject Name 过滤我的学生数组。对象示例如下:
@interface Student : NSObject
@property (nonatomic, assign) NSInteger studentId;
@property (nonatomic, strong) NSString *name;
@property (nonatomic, strong) NSString *class;
@property (nonatomic, strong) NSString *section;
@property (nonatomic, strong) NSArray *arraySubject;
@end
其中 ArraySubject 包含对象数组“Subject”
@interface Subject : NSObject
@property (nonatomic, assign) NSInteger subjectId;
@property (nonatomic, strong) NSString *name;
@property (nonatomic, strong) NSString *languageMedium;
@property (nonatomic, strong) NSString *creditHours;
@end
我想要的是提供“主题名称”并使用该主题名称过滤我的学生数组。
我希望我能解决我的问题。
【问题讨论】:
标签: ios objective-c nsarray nspredicate