using new swift pod to use in objective c
bindiManek opened this issue · comments
bindiManek commented
Hello,
I have an old project where I was using the Objective C version of your pod. but somehow app was crashing in iOS 13, so I removed the old Objective C files and installed the pod.
When I tried running it, it builds fine, I created bridging headers and all to make it work. but the following delegate method is not getting executed.
- (void)multiSelect:(MultiSelectSegmentedControl *)multiSelectSegmentedControl didChange:(BOOL)value at:(NSInteger)index {
}
What I can do achieve the same..
Yonat Sharon commented
I'm not sure what's the problem, maybe add _Nonnull
. This code works for me:
- (void)multiSelect:(MultiSelectSegmentedControl * _Nonnull)multiSelectSegmentedControl didChange:(BOOL)value at:(NSInteger)index {
NSLog(@"multiSelect didChange");
}
- (void)viewDidLoad {
[super viewDidLoad];
MultiSelectSegmentedControl *multiSegment = [[MultiSelectSegmentedControl alloc] initWithItems: @[@"One", @"Two", @"Three"]];
multiSegment.delegate = self;
multiSegment.frame = CGRectMake(32, 64, 240, 32);
[self.view addSubview:multiSegment];
}