GT2/GT2-iOS/node_modules/react-native-branch/ios/RNBranchProperty.m

45 lines
876 B
Objective-C

//
// RNBranchProperty.m
// RNBranch
//
// Created by Jimmy Dee on 1/26/17.
// Copyright © 2017 Branch Metrics. All rights reserved.
//
#import "RNBranchProperty.h"
#import "BranchUniversalObject+RNBranch.h"
#import <React/RCTLog.h>
@implementation RNBranchProperty
+ (instancetype)propertyWithSetterSelector:(SEL)selector type:(Class)type
{
return [[self alloc] initWithSetterSelector:selector type:type];
}
- (instancetype)initWithSetterSelector:(SEL)selector type:(Class)type
{
self = [super init];
if (self) {
_setterSelector = selector;
_type = type;
}
return self;
}
- (instancetype)init
{
@throw nil;
}
- (BOOL)isEqual:(id)object
{
if (![object isKindOfClass:self.class]) return NO;
RNBranchProperty *other = object;
return self.setterSelector == other.setterSelector && self.type == other.type;
}
@end