سؤال

I have searched all over but have not found any answers or even a question like this. I have a UITableView. When I load the table everything seems ok. However, when I start scrolling vertically the cells go past table boundaries on both top and bottom of the table. In case of the top cell, it only disappears off the screen once the bottom of the cell reaches the top of the table. Same thing happens on the bottom of the table. See image below. This happens in both iPhone and iPad app. Any help would be greatly appreciated!

Table cell goes past table boundaries when scrolling

هل كانت مفيدة؟

المحلول

Try setting:

tableView.clipsToBounds = YES;
مرخصة بموجب: CC-BY-SA مع الإسناد
لا تنتمي إلى StackOverflow
scroll top