简体   繁体   中英

Why UICollectionView offset changes when keyboard appears

I'm developing an iPad app, that has a horizontal UICollectionView . Each of the cells has a UITextField . When the UITextField becomes first responder, the keyboard automatically comes up, and surprisingly all the cells move upwards.

I haven't implemented any logic for the cells to move upwards. Do you know why?

I haven't found any documentation regarding this, and I'm unable to fix this.

This behaviour is implemented by Apple. The standard UICollectionView takes care for you to scroll to the correct position if a keyboard appears. Why would you want to fix this?

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