forked from mrnuku/util
-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathOKOMutableWeakArray.h
More file actions
39 lines (27 loc) · 968 Bytes
/
OKOMutableWeakArray.h
File metadata and controls
39 lines (27 loc) · 968 Bytes
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
29
30
31
32
33
34
35
36
37
38
39
//
// OKOMutableWeakArray.h
// McK.HERO.Demo
//
// Created by Kocsis Olivér on 2015. 07. 07..
// Copyright (c) 2015. Kocsis Oliver. All rights reserved.
//
#import <Foundation/Foundation.h>
@interface OKOMutableWeakArray : NSMutableArray
-(void) compact;
-(void) removeNilObjects; // same as compact
#pragma mark - NSArray overrides
- (nonnull instancetype)init;
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Wnullability"
-(nullable id)objectAtIndex:(NSUInteger)index;
#pragma clang diagnostic pop
-(NSUInteger)count;
#pragma mark - NSMutableArray overrides
-(void)insertObject:(nullable id)anObject atIndex:(NSUInteger)index;
-(void)removeObjectAtIndex:(NSUInteger)index ;
-(void)addObject:(nullable id)anObject ;
-(void)removeLastObject;
-(void)replaceObjectAtIndex:(NSUInteger)index withObject:(nullable id)anObject ;
// required for proper block lifetime management
- (nonnull id)addObjectReturnRef:(nullable id)anObject;
@end