I need resignFirstResponder
when a page slide with ECSlidingViewController
.
If i use UIPanGestureRecognizer
for that. Thats override ECSlidingViewController
and cant slide page after use that.
I need resignFirstResponder
when a page slide with ECSlidingViewController
.
If i use UIPanGestureRecognizer
for that. Thats override ECSlidingViewController
and cant slide page after use that.
You don't need to change the existing code. Instead, you should observe one of the notification names used by ECSlidingViewController
, like ECSlidingViewUnderLeftWillAppear
. To register, do the following on the initialization of your view controller:
[[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(slidingViewUnderLeftWillAppear:) name:ECSlidingViewUnderLeftWillAppear object:nil];
Then, implement a method like this one:
- (void)slidingViewUnderLeftWillAppear:(NSNotification *)notification {
[self.view endEditing:YES];
}
Hope this helps!
And i found a way myself. May be anyone need that like me.
Thats the solution:
Found that row in ECSlidingViewController.m file
-(void)updateTopViewHorizontalCenterWithRecognizer:(UIPanGestureRecognizer *)
recognizer
and add that row
[self.view endEditing:TRUE];
if anyone is using "SWRevealViewController" you can add
[self.view endEditing:YES];
under
and it will work like a treat!