我有一個數組(NSMutableArray)
其中包含StudentScoreObj和對象有missions
(NSArray)
。iOS如何對包含NSNumber的NSarray的自定義對象的NSMutableArray進行排序?
喜歡:
missions = @[@34, @43, @54, @23, @54];
需要使用任務陣列的第一對象進行排序陣列的StudentScoreObj。
我的代碼:
@interface StudentScoreObj : NSObject
@property (nonatomic, copy) NSString *teamType;
@property (nonatomic, copy) NSString *teamNumber;
@property (nonatomic, copy) NSString *studentName;
@property (nonatomic, copy) NSString *isParticipated ;
@property (nonatomic, copy) NSString *totalScore;
@property (nonatomic, copy) NSString *avgScore;
@property (nonatomic, copy) NSArray *missions;
@end
你是怎麼試過的? – Paulw11