Я новичок в Swift и не могу прокручивать табличное представление по горизонтали, для этого я использовал Scrollview, но оно все еще не прокручивается
Но он показывает только
Не прокручивайте по горизонтали, может кто-нибудь, пожалуйста, помогите мне. Моя структура такая:
Кто-нибудь знал, как преобразовать этот код в swift
UITableView *tableView = [[UITableView alloc] initWithFrame:CGRectMake(x, x, x, x) style:...]
[scrollView addSubview:tableView];
// Set the size of your table to be the size of it's contents
// (since the outer scroll view will handle the scrolling).
CGRect tableFrame = tableView.frame;
tableFrame.size.height = tableView.contentSize.height;
tableFrame.size.width = tableView.contentSize.width; // if you would allow horiz scrolling
tableView.frame = tableFrame;
// Set the content size of your scroll view to be the content size of your
// table view + whatever else you have in the scroll view.
// For the purposes of this example, I'm assuming the table view is in there alone.
scrollView.contentSize = tableView.contentSize;