I would like to add swipe gesture to UINavigationBar. It is possible? As in figure.
Asked
Active
Viewed 385 times
0
-
[self.navigationController.navigationBar addGestureRecognizer:getsure]; – harsha yarabarla Nov 16 '15 at 11:31
-
`UISwipeGestureRecognizer *barSwipe = [[UISwipeGestureRecognizer alloc] initWithTarget:self action:@selector(barSwipeAction:)]; [self.navigationController.navigationBar addGestureRecognizer:barSwipe];` It doesnt work for me. Method `barSwipeAction` is not called. – PatrikD Nov 16 '15 at 11:37
-
That navigation bar is from Navigationcontroller right ? or you added the navigation bar to your view – harsha yarabarla Nov 16 '15 at 11:41
1 Answers
1
You can do it adding custom view into the navigation bar. After adding custom view into the navigation bar add gesture recognisers to it and change x-axis accordingly. Here is some useful resources about how to add custom or built-in view into the navigation bar. add segmented control to navigation bar
Custom segmented view framework : UIScrollSlidingPage

Community
- 1
- 1

serhat sezer
- 1,330
- 1
- 10
- 26