I want to create a horizontal scrollable "timeline" that has sticky section names (dates):
The horizontal lines are dividers for different dates. The date stays on until this divider (circled red in the last picture) "pushes" it away from the screen.
In other words, the date stays on the screen until another date pushes it away.
Is there a way to achieve something like this?
Related
I am trying to implement like word cloud in my app.
The image shown is like word cloud with left alignment.
What I did was, for placing the buttons I am checking whether the width of the text is greater than total width of the screen, if it is greater place the button in next row i.e increment the y position, if it is not just place the buttons. Everything is working fine. But what I want now is , i want to move the buttons alignment, like, I want to start the first button from center of the screen. Please help me to do this...
In my tvOS-app I use a tableView with custom cells. If the cell is higher than the TV-screen it will show the "center-part" of the cell (top and bottom are not visible) and scrolling up or down will center the cell above or below. Is it possible and if, how, to change the "jumping" from cell to cell to a smooth scrolling like in iOS?
You should limit your cells to use a fixed height for a few lines of text and show focus. When a user selects one of the cells you can then expand / zoom / transition to show the whole text is a specific scrollable text view. This interface maintains the users understanding of content, lists and block text.
Just found the solution. Knowing what to search could be an advantage ;-)
Adding this simple line gives me the handling like in iOS:
self.tableView.panGestureRecognizer.allowedTouchTypes = #[#(UITouchTypeIndirect)];
So I created a bunch of PanoramaItems with Width of 600 and Orientation of Horizontal. When I swipe to the right direction the items align perfect on each item. When I swipe back to the left direction, it appears everything is aligned to the right side forcing me to swipe again to get my alignment correctly.
Is there a way to set the focus location of a panoranaItem each time someone changes their selection? Because it is odd to swipe once in one direction and swipe twice in the other.
In my app I'm using a scrolling canvas composed of equally sized cells.
The number of rows is unlimited, but the number of columns is fixed to 13.
At anyone time, I have exactly 7 cells fitting the width of the view.
I wrote my own tiling UIScrollView and everything is fine and works fine except for one thing:
I want to enable "paging" on the cell boundary, not on the "page" boundary.
In other words I want the horizontal scrolling to move no more than "one cell at a time". This is a usability issue.
In a standard UIScrollView with pagingEnabled=YES, there is some inertia when moving from one page to the next, but then the page is defined as having the full width of the view. I want to define the notion of page as 1/7 of the view width, such that I get the same kind of inertia when moving the display from cells 1-7 to cells 2-8, to cells 3-9, etc...
How would I go about that?
I found this and this, but this a related but different problem.
"Try making your scrollview less than the size of the screen (width-wise), but uncheck the 'Clip Subviews' checkbox in IB."
More info here.
Look at the titles of the buttons. Also the placing of the 1 at the bottom.
Any idea what can cause that? (All I did was to drag and drop and wrote some simple calc code)
In your picture, there are blue lines to the bottom and left of your 1 button. This means that your button is aligned to the bottom left of the screen.
The rest of your buttons are probably aligned with the top of the screen. This means that if height of the screen changes, your buttons will not line up. If you align the button to the top of the screen you shouldn't have this issue.
You can change the alignment by moving the button to the top of the screen so that the blue line is at the top and then dragging it back down to where you want it, or you can change it in the Size Inspector.
As for the issue of missing titles, it looks like somehow the buttons with missing titles have strange constraints that cause the titles to disappear when the screen is getting laid out. I was able to get rid of the issue by deleting all but the first row of buttons, selecting that first row and duplicating it 4 times for the other rows. This ensures that all the buttons are lined up perfectly. A couple of your buttons had a width of 71 instead of 64 which might have been causing them to be laid out poorly.