IOS UITableViewCell - Swiping Sections - ios

I have a brief that requires a swiping panel view to display a staged fitness plan event - basically I need something that swipes uitableview sections horizontally similar to the way the suggested Apps panel works - i'd need to use custom cells - no idea if this is possible as I cant find any information anywhere to guide me - does anyone have any experience or can offer any advice!?

At the simplest level you can just stick a UIScrollView in the cell. If you need to put a lot of elements in there and performance is a concern you would use a UICollectionView with a layout like the built in UICollectionViewFlowLayout with horizontal scrolling. Then, each of those elements would just be a UICollectionViewCell.

Related

Horizontally Scrolling UICollectionView with Vertically Scrolling Sections

I'm trying to implement the following:
At the top is a segment control that, based on the user's selection (either tapping or scrolling), moves to the relevant CollectionView section.
I've been playing around for a couple of days with CollectionViews and maybe I've just confused myself with LayoutFlows and CompositionalLayouts or is that over complicating it?
I have a diffable datasource that is made up of [Sections, CellItems] but I'm struggling with how to structure it.
What is the recommended programmatic (rather than using interface builder) to do the above? I was just going to originally do 5 horizontal cells, each with a tableView but based on some other comments I've seen from Apple on the Apple forums and the move away from TableView to CollectionView at this year's WWDC, I thought I should be trying to do this properly.
Any direction would be appreciated. All my research seems to point to using orthogonalScrollingBehavior but that layouts out the sections vertically with each section scrolling horizontally.
So my question is should I be trying to do what I'm doing using a CompositionalLayout?
Well first off your segmented control idea makes this sound like you could just use a page control for the horizontal aspect and remove a lot of the collection view complexity. Something to consider anyway.
As for the data source, I think all you need is an array of arrays. Eg. [[CellItems]]. So CellItems[0] would be the first column. Then CellItems[0][0] would be the first cell. CellItems[1][2]... 2nd column 3rd cell. I do apologize as your current solution may be related to diffable datasources and I haven't had time yet to dig into those.
Start with the horizontal axis first and ignore the vertical axis. Get that working as needed. Once you have that up and running... implement another collection view into the first one's cells.
Sorry if I misunderstood the question if it was more about HOW to implement a collection view.

How to add UITableView cell pagination with “peeking”?

I want to add something like what’s in the app store app:
As you can see, it isn’t just one cell that is paged, but you can also see the two edges of the cells from the left and right as well. I tried to implement this in my app by making each cell slightly smaller than the size of the collectionView, and then enabled isPagingEnabled, but when I flipped from cell to cell, it didn’t page from cell to cell, rather the width of the entire UICollectionView every time. This ended up in an unwanted effect where each page turned resulted in an increasing offset where cells were shifting further and further off the screen.
I researched a bit on this and implemented the targetContentOffset(forProposedContentOffset... but it was never called and didn’t work.
Preferably, I would want to keep the smooth behavior of the built-in pagination and just be able to tweak it.
Thanks!
Instead of implementing the peeking behavior yourself delegate it to a third party library iCourasel. Implementing it yourself you will ended up a UICollectionView inside of UITableViewCell. As of your requirement iCarouselTypeLinear suits your requirement.

iOS Multiple Scrolling Sections - Right way

i have question regarding one screen which i should implement in app, as iOS giving us various possibilities i don't know which one is the best practice for this current task.
Sections as visible on the screen should scroll and while we select one of them, should show unique data.
Scrolling Data Is Static.
My ideas:
1) Create multiple tableView's to support scrolling and get button actions.
2) Using the scrollView - programmatically add buttons on scrollview with multiple IBActions.
3) Modify UIPickerController to support such template.
As i mention there are lot of options and maybe i have missed more, but question is: In which way you would finish this tasks and how do you think is right way to handle such a design because on iPhone 5s we know that this UIView will be resized and will be smaller so UIView should be inserted in ScrollView itself.

UITableView vs UIScrollView

I am working on an animation application. I would like to have an horizontal UITableView or horizontal UIScrollView that will show little images representing a drawing at page X.
Since that my animation app can easily have 200 drawings, this means that my UITableView or UIScrollView can contain 200 images.
Finally, I would like to implement UIAnimation, where the user will be able to reorder the images by drag and dropping. I would like to have something smooth...
I have 2 questions :
Which classes is the better for memory management? I think I understood UITableView automaticly unload cells that are off screen, not UIScrollView. Is that true?
Which one might be easier to implement, considering possible heavy load? (I found this for horizontal UITableView : EasyTableView
Thank you
You should look into tiling with UIScrollView. There have been some very good sessions talking about advanced use of UIScrollView at WWDC over the past three years, and the videos of those sessions are available if you're a registered developer. They'll show you how to use UIScrollView's tiling feature to load just the content that you need, much as UITableView loads only the content that it needs.
As far as I'm aware, UITableView doesn't work in a horizontal mode, so UIScrollView is currently your only choice if you're only considering classes in Cocoa Touch. I'm sure there are some third party options, but I don't know enough to recommend one.

Implementing a table on ipad - possible solutions

I want to implement a table which is similar to the tv guide that you see in Yahoo app on iPad. The user needs to be able to scroll horizontally, vertically and even diagonally. The cells have to be resized dynamically based on the content.
Is this possible using UITableView or AQGridView? Or is there any other other approach to implement this kind of an interface?
You can achieve such behavior using a rotated UITableView inside a UITableView
have a look at this tutorial:
http://www.raywenderlich.com/4723/how-to-make-an-interface-with-horizontal-tables-like-the-pulse-news-app-part-2

Resources