简体   繁体   中英

UIPageViewController bug with UITextField and keyboard showing

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.

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.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM