Add helper categories to NSArray and NSSet

This commit is contained in:
Sergey Abramchuk
2018-10-16 19:08:00 +03:00
parent 3231a87660
commit 10f3985e57
5 changed files with 92 additions and 0 deletions
+18
View File
@@ -0,0 +1,18 @@
//
// NSArray+Empty.h
// OpenVPNAdapter
//
// Created by Sergey Abramchuk on 16/10/2018.
//
#import <Foundation/Foundation.h>
NS_ASSUME_NONNULL_BEGIN
@interface NSArray (Empty)
@property (nonatomic, readonly) BOOL isNotEmpty;
@end
NS_ASSUME_NONNULL_END
+16
View File
@@ -0,0 +1,16 @@
//
// NSArray+Empty.m
// OpenVPNAdapter
//
// Created by Sergey Abramchuk on 16/10/2018.
//
#import "NSArray+Empty.h"
@implementation NSArray (Empty)
- (BOOL)isNotEmpty {
return (self.count > 0) ? YES : NO;
}
@end
+18
View File
@@ -0,0 +1,18 @@
//
// NSSet+Empty.h
// OpenVPNAdapter
//
// Created by Sergey Abramchuk on 16/10/2018.
//
#import <Foundation/Foundation.h>
NS_ASSUME_NONNULL_BEGIN
@interface NSSet (Empty)
@property (nonatomic, readonly) BOOL isNotEmpty;
@end
NS_ASSUME_NONNULL_END
+16
View File
@@ -0,0 +1,16 @@
//
// NSSet+Empty.m
// OpenVPNAdapter
//
// Created by Sergey Abramchuk on 16/10/2018.
//
#import "NSSet+Empty.h"
@implementation NSSet (Empty)
- (BOOL)isNotEmpty {
return (self.count > 0) ? YES : NO;
}
@end