Can anyone suggest what to use to make the UI screen as Mention? - ios

I have design the UI for the below screen as I am little bit confuse that what should have to use for the below screen. As you seen the on the screen below things:
1.Scrolling part of Images swap.
2.Again another Scrolling images Swap.
So here for the scrolling Images what should I use its Collection View for both or Pagecontrol for one and Collection view for other. Please suggest me.
Thanks and Appreciate for the help...

Use UITableView and in its cell use UICollectionCell so that you can scroll horizontally and vertically.
see Back image, this is how you can implemented output looked like.

As Tinu Dahiya pointed it correctly, You should use tableView and custom tableViewCells to achieve your UI design. This approach will also make your coding easy to handle dynamic contents which you might be fetching from server. For your reference you can directly use this control from cocoa controls. This control is ready made dish for you, you just have to implement your logic to achieve your functionality.

Related

Swift: Drag and drop cells within the same UICollectionViewController

I am building an app which enables user to drag a UIView onto another. Currently I have the implementation as a UIScrollView but that does not give me the best experience as to achieve an experience like Apple's drag and drop requires handling of many cases ( including edge cases).
I am curious if this can be done using a UICollectionView. I am looking to drag cells onto another cells after which the cells contents merge and the source cell is removed.
Any idea/ suggestion would be appreciated. I am not sure if adding what I have is neccessary but if needed I can certainly add the code which I have.
Yes, using a collectionView would be a good choice for scrolling and drag/drop. There are many built in methods that support drag and drop.
https://developer.apple.com/documentation/uikit/views_and_controls/collection_views/supporting_drag_and_drop_in_collection_views

What is proper way to show data like app store app(Collection view inside table View)

There are lots of stack-overflow thread and community articles but i just want to know which one is better to show data like App store App(Vertical scrolling of apps and sometimes horizontal scrolling inside vertical scrolling). So far i understand below might be possible solution.
Solution 1:
Collection View inside tableView. So that products can be scrolled horizontally inside tableView cell.
Solution 2:
Number of collection View inside a scrollView stacked one after another if categories are specific.
Is there any better solution to make such type of scenario?. Your opinions will be highly appreciated. Thanks
A general suggestion based on my usage, create a tableview and inside it's tableviewcell create a collectionview. You may use staggered layout for a better user interface. That is what I have been doing, you will build it much easier.
Rest depends on your usage and requirement.

IOS Scrollable View inside another ScrollView

I need to implement this screen and I wonder if anyone can help me with ideas to solve some scenarios, basically the screen will contain a parallax effect in the top image, the entire screen must be scrollable, the problem I am faced when designing this screen It is the way I see I need to have a scrollview and a tableview that generates me the trouble of having the scrolls in the same direction.
I've read several post here about the problem of having scroll inside scroll for example: Nested UITableView inside another nested table , and what I want are actually ideas that can help me implement the screen below.
I just need suggestions of good practice, no one needs to worry about post code unless some lib to help with the problem or something.
I appreciate any help.
I finally solved my problem, I implemented a solution based on ParallaxTableView and is-it-possible-to-add-uitableview-within-a-uitableviewcell
And here is my project : UITableViewHeader
The trick on that (DEPENDS IF YOU REALLY WANT THAT BEHAVIOR) is having the image on the table view header. there are plenty of tutorials on github with sample implementation also.
e.g that one

(Swift) How to implement a Page Control through paging single views?

I want to implement a page control in my project so that every view can be accessed through swiping left or right. Every example I have looked at is to do with images, not views. I've been studying this and its of course images again. My application is a single view application. I'm not really sure what code snippets to give you so far, I don't think I do because I haven't done anything on this yet. If you need specifics, please comment and ask me, i'll be here all day.
Please help me!
Thanks.
The same idea should apply in the tutorial you cited. They're adding UIImageView to a UIScrollView. So in your case, instead of UIImageView just use UIView. Also you can think of the pageImages array as a data source about your views. For example, instead of an array of UIImage you can just have an array of some model object that helps you configure your view. However, keep in mind that the implementation in the tutorial for your case won't scale if you plan to have a lot of UIViews. That's because you want to effectively reuse views that aren't showing. When it gets to that point, you're better off implementing a UITableView that scrolls horizontally.
You can use UIPageViewController for paging effect. Check out this tutorial. It is written in obj-c but who cares. It will give you idea about using UIPageViewController.

Create vertical tabbar for ipad

Today I tried to implement a vertical tabbar for iPad. I checked a lot of questions on Stackoverflow and other sites but couldn't find the appropriate answer. Here are what I found:
https://github.com/futuresimple/FSVerticalTabBarController
https://github.com/nst/SEVerticalTabBar
https://github.com/NOUSguide/NGTabBarController
In my opinion, the third component is great. However, I guess I'll have to customize a lot before I can use to create this following UI:
So do you know any components/libraries that match my UI? It would be great if anyone can suggest me a correct one. Thanks.
Try to use FSVerticalTabBarController. I have used it and it is easy to modify...
You can try this component IIViewDeckController. Its very light weight.
Usually it will be used for Stackview, left Menu kind of UI.
But you can do a small trick like below to achieve your design above.
Steps:
The component have left, right, top, bottom and center stack of controllers.
Use a UITableView on your LeftViewController to design your above UI.
Each index will act as a container of OneViewController.
Clicking one cell of your tableview will place the appropriate ViewController in the center controller of IIViewDeckViewController.
Its very easy, I guess you will like it. Just take some time to go through their examples.
Hope it will be useful
I translated futuresimple/FSVerticalTabBarController into Swift 5.
My repo is https://github.com/coyingcat/VerticalTabBar
Apple's doc Implementing a Container View Controller is great also

Resources