Vertical bounce after rotating a UITableView (contentView?)

I rotate my tableView using tableView.transformation to use the portrait tableView in landscape mode, but since I did, my TableView bounces vertically and horizontally. By default, tableView only bends vertically; so I thought that after its rotation I get only a horizontal bounce, but it will bounce both horizontally and vertically.

Does anyone know how to fix this? Perhaps this has something to do with the contentView of the View table (the UITableView inherits from UIScrollView). I tried to set the contentView, but it does not work.

+3
source share
1 answer

Simplest implementation

UITableView *tv = [[UITableView alloc] initWithFrame:CGRectMake(10.f, 10.f, 300.f, 300.f) style:UITableViewStylePlain];
tv.transform = CGAffineTransformMakeRotation(1.5707);
[self.view addSubview:tv];

. ( ). IB, , Bounces and Bounce Vertically, Bounce Horizontally - .

0

Source: https://habr.com/ru/post/1795432/


All Articles