Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

UIPageViewController bug with UITextField and keyboard showing

Tags:

ios

ios6

So I'm trying to find a workaround for this bizarre bug: http://www.screencast.com/t/UqvVn8ccodEV

Basically I have a UIPageViewController with sub view controllers (obviously). Once I add a text field, it does this weird thing where if you scroll it and then click a text field, it randomly moves to another page. None of the delegates get called, and the keyboard moves up and down again.

Seems like the same thing as here: clicking/typing on UITextField increments UIPageViewController instead of displaying keyboard

Also seems to be recorded here: http://openradar.appspot.com/13315308

Can't figure out what the hell this would be, or a way around it.

Edit

Here is a skeleton version (pulled from the linked question): https://www.dropbox.com/s/6l5efem3wque7li/pageScroll.zip?v=1mci

Scroll one page, then hit the textfield. Only happens the first time around.

like image 928
Bob Spryn Avatar asked Oct 22 '22 08:10

Bob Spryn


1 Answers

Check this voodoo out: Embed your UITextField within a UIScrollView. I tried it on the project you referred to and it worked.

I guess it has something to do with changing the responder chain that messes things up.

like image 170
Stavash Avatar answered Oct 24 '22 07:10

Stavash