G
G
grischyov2014-03-06 16:27:44
Objective-C
grischyov, 2014-03-06 16:27:44

How to reproduce the sliding keyboard effect in iOS7?

In iOS 7, the Messages app has this effect when using the standard iOS7 method interactivePopGestureRecognizer to close a UINavigationController with the keyboard active. It looks like this:
JyYJP.png
However, there is no way to reproduce the same effect. If you do not change the code and do not touch anything, then the following happens:
8JD0J.png
Calling the method at any point in the presentation of the UIViewController does not lead to anything. It would be possible to take a screenshot of the keyboard and put it in its place, but it would be noticeable, and, in my opinion, slowly. Is there another solution to the problem? [self.view endEditing:YES];

Answer the question

In order to leave comments, you need to log in

2 answer(s)
A
Alexey Storozhev, 2014-03-07
@storoj

Apparently you want her to go too. So you need to take it and move it, it seems you can reach the keyboard through [UIApplication sharedApplication].windows

M
MANIAK_dobrii, 2014-04-02
@MANIAK_dobrii

You can try to take a screenshot of either the entire screen or the keyboard layer and hide the keyboard without animation.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question