Best design for a floating view that will follow a tableview's center cell, instagram video search table - ios

I need to implement a view that will contains details about a table view cell. This view will be floating right above the center cell of a table view and should automatically re-assign itself to a new center-cell upon scrolling of the table.
My current approach is inserting this view to the table view as a subview and then adding constraints to it with respect to the center cell as you scroll and the center cell is changed. But I've been having some issues with the constraints (sometime's breaking) probably due to the fact that I am adding subviews to the table.
I would appreciate any other possible solutions to this or guidance, thanks!
What I am trying to accomplish is something similar to the Instagram's video discovery table

Related

horizontal scrolling for each section in a table view

I want to implement a UICollectionView with multiple sections which each section scrolls horizontally and independently like the attached image
I suggest you to use UITableView with customized UITableViewCells with UIScrollView as subview on its contentViews.
There are many samples, for example here
You can use multiple UICollectionViews in table cells. The tableView will scrolls vertically and The collection views can be configured to scroll horizontally by setting particular set of properties which will restrict them to scroll vertically, and they will only scroll horizontally. One constraint to consider is it is much more difficult to do animations that need to move from one table cell to another and you can't use a neat single change of collection view layout to animate all the items in your table view. But if these constraints aren't a problem then this is a relatively easy solution. I also tried it once. It worked for me. Hope that it works for you as well.

How to implement those tables please

I have to implement the tables below
I know I can use custome cell with two labels but any idea how to implement the overall shape with the vertical and horizontal labels
Maybe set up a regular view controller. Then add a collection view, make the cell very large. In that collection view cell add a label on the side (this will become the light blue box). Then right next to it add a table view with sections. The header would be the red and dark blue area.
This would work, but you need the flexibility of starting as a view controller, and doing the collection and table view through delegates
Your question is too broad and cannot be answered in such form.
It's a customized UITableView created by Subclass-ing the UITableViewCell.
Check these tutorials and third-party controls:
Horizontal TableView
MDSpreadViewDemo
KKGridView

Imitate the combined horizontal and vertical scrolling in the iOS iTunes store

I'm trying to create a screen similar to that in the new iTunes store:
That is, a grid that's scrollable both horizontally and vertically.
The first approach I've tried involved creating a UITableView (for the vertical rows) and, within each UITableViewCell of that UITableView, another UITableView that's rotated 90 degrees.
This seems to work visually but I'm not able to scroll vertically. I believe the gesture recognizers from the subview tables are preventing the gesture recognizers from the parent table view from receiving touch events.
Basically, the rows scroll horizontally but not vertically.
The next approach I've thought then is to create UISrollViews for each row but I was wondering if there's something I've missed?
Has anyone else encountered this issue in the past?
I have done something similar to what you have with table view inside a table view, I made the rotated 90° table view the parent instead. I think I also had to turn off scrolling for one table views when scrolling is detected in the other table view, and visa-versa.
If your trying to target below iOS 6.0, ruling out using the UICollectionView, I would try using GMGridView:
https://github.com/gmoledina/GMGridView
It's very complete and has many features. It also has horizontal paging support which may achieve what you are looking for.
You should have a look at UICollectionView.
Never tried to build something like that but... Idea :
One tableview, n-cell, each cell embed a scrollView wich can contains, n-subviews.

ScrollView or TableView as the cell for a horizontal Table view

I am aiming for a kind of horizontal table view where each cell (let's now saw column) is also a scrolling area.
Apple discourages you to use a scroll view inside a table view cell however since my table view will be rotated I think it could work out.
Has anyone tried this before and if so would you recommend how I am proposing to do this or would you suggest using some kind of custom view / grid framework out there ?
Quick doodle of the idea:

How to get UITableView header view to come before table cells in responder chain?

I have a rather large table header view above my table view. I have a number of subviews in that header view. I am doing something a bit nonstandard where I am "sticking" some of those subviews (but not all) at the top of the table view.
My problem is that although visually the table view cells pass under the sticky table header subviews, it seems that the table view cells are "above" the table header view in terms of touch response. (For example: I have a button that is a subview of the table header view. When there are no cells underneath the button, the button works great and responds to touches. However, when the user scrolls the table view so that there are cells underneath the button, a touch on the button actually selects a hidden cell rather than push the button.) Can anyone give advice on how to "raise" the table header view above the table view cells, so that its subviews get first shot at touch handling?
I am using a table header view rather than a section header view due to the fact that I only want some of the subviews to stick (letting the others scroll up off the screen as usual). One of the subviews also can be expanded (and that expansion is animated) - to a height that is even bigger than the entire height of the screen. For these reasons, I didn't think using a section header view would be feasible. (If it is, please let me know, as I know that section header views are "above" table cells when it comes to touch response.)
You may try this, which would keep the desired header view on top of the others.
[yourView bringSubviewToFront:yourSubView];
This may be able to help as well:
http://www.iphonedevsdk.com/forum/iphone-sdk-development/5222-keeping-subview-front.html
Is this what you were looking for or did you want another approach?

Resources