I'm trying to implement a segmented control. I want to customize it:
Separate boarder for each item.
Default segment should be in color
boarder.
Segment control should be scroll
How can i achieve like below image?
Any help much appreciated pls...
To achieve what you are looking for you need to use UICollectionView with your custom flow layout.
Here are some examples that you can use or inspire : TTGTagCollectionView - YNSearch - TagListView
Related
I'd really like to program an interface similar to the shortcuts gallery as shown below:
(source: i.ibb.co)
So I'm thinking this would be a table view with custom cells and then some kind of paging view or collection view? Am I along the right lines?
Cheers for any help!
If you're looking to achieve this UI you'd need to implement a UITableVIew with nested UICollectionViews.
Another approach would be to use a UIStackView with UICollectionViews.
like this~
GIF:
[enter link description here][2]
https://github.com/noties/Scrollable/blob/master/art/scrollable_colorful.gif
I amm sorry I didn't say clear. I also need to implement the vertical scroll .See GIF~
The best approach is to use a collection view and set its movement as horizontal, then you can create a custom collection view cell, insert an UIButton inside it and delegate to your view to populate it with the options you want.
You can refer to this tutorial to help you:
https://www.raywenderlich.com/136159/uicollectionview-tutorial-getting-started
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.
I actually just posted, but I am re-asking to give a better concept.
I'm trying to use a segmented control change through multiple views inside a container view. I'm also not sure how to embed multiple views inside the container view. I saw a tutorial how to do it in Objective-C, but I am coding in Swift.
This is a perfect example of what I'm looking for. There is a UITabBarController on the bottom, but there is a segmented control to alter between "Tweets" "Photos" and "Favorites." How could I achieve this?
Thanks in advance!!
I'm assuming you have a collection view or table view or something below the segmented control. If that's the case, I've had good luck using the segmented control to switch data sources (and delegates, if necessary) for the collection. If you just have views, you can use the segmented control to show one and hide the others.
Do you have any code or more specific questions?
I have used UIDatePicker as native control and also used libraries mentioned over Stackoverflow and github. But i want to have a calendar view , horizontally scrolling days in a row like in image.
Please share your ideas/logic about what are possible solutions to achieve this functionality. Thanks
You can use library that is most closest to functionality you required and can customize its appearance as per you need.
https://github.com/CapitalGene/objc-CGCalendarView
Seems like a perfect time for a horizontal collection view. Just have some sort of calendar datasource and you are good to go. Should be able to use the flow layout and set the direction to horizontal and kapow, done.