12345678910111213141516171819202122 |
- //
- // SelectedTimeModel.m
- // smartRhino
- //
- // Created by Android on 2019/12/21.
- // Copyright © 2019 tederen. All rights reserved.
- //
- #import "SelectedTimeModel.h"
- @implementation SelectedTimeModel
- - (NSComparisonResult)compareIndex:(SelectedTimeModel *)otherModel {
- NSNumber *selfIndex = [NSNumber numberWithInteger:self.indexPath.item];
- NSNumber *toIndex = [NSNumber numberWithInteger:otherModel.indexPath.item];
- NSComparisonResult result = [selfIndex compare:toIndex];
- return result == NSOrderedDescending; // 升序
- }
- @end
|