Problem: I want the user to be able to slide through various tableviews, that will appear in collection view cells. But these tableviews require their own controllers since they will be dynamically sized with different prototype cells. How does one go about doing this in swift 2?
My Failed Approach: Make a storyboard with the tableview controller set up as a scene and then try to instatiate it in code as the collection view cell. I am making the collection view programmatically.
Related
I have a problem with accessing collection view cells inside a table view cell when using app.debugDescription during XCode UI Test runs.
First of all, XCUIApplication proxy do not see any collection views, but there are 4 of them, 2nd it does not see any cells other than the 4 cells of UITableView.
I have tried setting isAccessibilityIdentifier to false on these table view cells, but no use. If I set isAccessibilityIdentifier to true for each collection view, then I can see 4 collection views, but still no cells. I have put accessibilityIdentifier values to each cell in collection view and on elements inside a collection view, like UILabel and UIImageView.
If I set isAccessibilityIdentifier to true for collection view cells, then I can see accessibilityIdentifiers for each cell when printing out app.debugDescription, but as other element, not as of cell type.
Can anyone assist me here, here is my screenshot of view hierarchy in the storyboard.
I have 1 colleection view with 4 cells which scrolls horizontal just like old youtube ios app. Under these 4 cells, each cell has custom collection view cell with 4 rows scrolls vertically. Under these rows there are customized collection view which scroll horizontally like netflix app with customized collection view cell. How do i pass data from these inner cells to a view controller with naviagation controller. No storyboard are been used. I can not push view controller from collection view cell. Also protocols are not working from inner cells. Any alternative?
This is a tableView. The white sections are the tableview cells. In the footer of tableView, I've added a scrollview with 2 containers views embeded with 2 UIViewControllers. These embeded view controllers contains tableView.
Now I'm having a problem with the scrolling. I'm scrolling the main tableview and as I scroll, I'm changing the height of the table footerview on which the scrollview is added. Now the problem is when I scroll through child view controller, I'm not able to scroll to the top of my main tableView. How should I do it? Is there is demo github project which I can refer to any code?
EDIT:
This is how my storyboard looks like:
I want to implement something like Facebook has implemented. I think they are using tableview with page view controller. How can I achieve this?
I have created a table view controller with a table view cell for my iOS app with storyboard in Xcode 6. In the cell I have an image and a label. At the top of the view controller I want to have a header and at the bottom I have a tab bar. That's my setup.
But now I want to change the position and the layout of the table view and the inherit cells, default they cover the whole screen. The table view should start below the header and should end above the tab bar. At the moment the cell content is displayed under the headline and the tab bar. Is it possible to set the positions of the table view and/or cell? And also I want to change the layout of the cells. I want to have some space between two cells and a corner radius.
THX!
This is an old "problem". If you want to use a UITableViewController, the table view will cover the whole screen. In fact the UIViewController's view property will be the table view.
If you want to have a table view and other views on the screen, you will have to use UIViewController and add two subviews to it's view: the header and the table view.
Do the following (which the UITableViewController would have done for you):
add the table view as an ivar;
have the class conform to UITableViewDelegate and UITableViewDataSource and
set it to the table view's delegate and datasource
I have a UIViewController in storyboard that will be a sliding up menu. I want to place it in a UITableView. If I place it as subview of UITableView and prevent it from scrolling, it gets the look I want, with one problem, the section headers of tableview scroll above subview.
Now, in order to prevent this behavior, I could reduce tableview frame, but it doesn't work because my subview is inside that same frame, right?
So , if that is true, what is the best way to achieve this? Place both screens inside a third UIViewController?
Don't try to put other views inside a table view. Bad news.
If your table view is managed by a UITableViewController then that's really all you can have in the table view (unless your views are inside cells, or in headers or footers.)
If you ARE using table view controllers to manage your table view(s), I suggest you create a container view on the view controller that needs to contain the table view, then control-drag an embed segue to the table view controller. That way the table view controller becomes a child view controller of the main VC, and you can put other view elements on the screen to your heart's content.