I want to dismiss a modal view with dragging down photo like twitter app's photo views.
I found same issue, but it written in Swift.
I need Object-C version.
I want to dismiss a modal view with dragging down photo like twitter app's photo views.
I found same issue, but it written in Swift.
I need Object-C version.
You can use UISwipeGestureRecognizer (Down) to achieve the behaviour.
Add gesture to the model view using below code:
UISwipeGestureRecognizer *downGestureRecognizer = [[UISwipeGestureRecognizer alloc] initWithTarget:self action:@selector(downGestureHandler:)];
[gestureRecognizer setDirection:(UISwipeGestureRecognizerDirectionDown)];
[self.view addGestureRecognizer: downGestureRecognizer];
The method to dismiss the model view:
-(void) downGestureHandler:(UISwipeGestureRecognizer *)recognizer {
//Code to dismiss model view with animation
}