杨锴
2024-10-09 e987bc09f955e01c2835f01e3a6af20723a579f9
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
//
//  NSArray+OBSMTLManipulationAdditions.h
//  Mantle
//
//  Created by Josh Abernathy on 9/19/12.
//  Copyright (c) 2012 GitHub. All rights reserved.
//
 
#import <Foundation/Foundation.h>
 
@interface NSArray (OBSMTLManipulationAdditions)
 
/// The first object in the array or nil if the array is empty.
/// Forwards to `firstObject` which has been first declared in iOS7, but works with iOS4/10.6.
@property (nonatomic, readonly, strong) id obs_mtl_firstObject;
 
/// Returns a new array without all instances of the given object.
- (NSArray *)obs_mtl_arrayByRemovingObject:(id)object;
 
/// Returns a new array without the first object. If the array is empty, it
/// returns the empty array.
- (NSArray *)obs_mtl_arrayByRemovingFirstObject;
 
/// Returns a new array without the last object. If the array is empty, it
/// returns the empty array.
- (NSArray *)obs_mtl_arrayByRemovingLastObject;
 
@end