MMDrawerController
MMDrawerController copied to clipboard
best way to delete table row under MMDrawerController
Hi there,
I need to delete tablerow under MMDrawerController on ios swift. But swiper/gesture control goes to MMDrawerController. what is the best way to delete table row under the controller? Tried too disable MMDrawerController for given viewcontroller but it was not much fun. is there any one implement this functionality under MMDrawerController pls share. Thanks
@davidnomo Something like that could work for you:
__typeof(self) __weak weakSelf = self;
[self.drawerController setGestureShouldRecognizeTouchBlock:
^BOOL(MMDrawerController *drawerController, UIGestureRecognizer *gesture, UITouch *touch) {
CGPoint location = [touch locationInView:weakSelf.window];
CGFloat width = CGRectGetWidth([UIScreen mainScreen].bounds);
return 3.0f * location.x <= 2.0f * width;
}];
I solved the problem, for me the solution was the following:
In the file MMDrawerController.m at the beginning of
-(BOOL)gestureRecognizer:(UIGestureRecognizer *)gestureRecognizer shouldReceiveTouch:(UITouch *)touch{
I added this code:
NSString *className = NSStringFromClass([touch.view class]);
if ([className isEqualToString:@"UITableViewCellContentView"]) {
return NO;
}