require Customizing UIPickerView - ios

I have a requirement where UIPickerView should be customised. The picker view should look adjacently like this!
[https://docs.google.com/drawings/d/1CHCBvB1IEebj82Xt1ZGBYTKhCUMBmeAeQBV5fvbI-6s/edit?usp=sharing
Any ideas on how to achieve this feat?

Don't use a picker view, you will break your head attempting to get it right.
Use a pair of ui table views, the left table cells correspond to right table sections. The right table sections are hidden until their respective, parallel row is selected
Sorry about formatting, on iPhone

Related

How to use collapse option to display list of users

How to design and code this in swift(IOS) AND Xcode.If we tap on down button it should display items and vice-versa like this:
You need a Collapsable TableView. In order to achieve that, in your TableView you must keep track of which sections are collapsed (contracted) and which of them are expanded. For this you need to maintain a set of indices of sections that are expanded, or a boolean array where the value of each index indicates if the corresponding section is expanded or not. Check for the values at the specific index while assigning height to a certain row. Check this link for more help.
Refer ans by #Cristik.Refer my previous ans for more info.
You need expandable table view. Basically, you need to control the open and close of sections of your table view.
Here is an good example with working code & animation written in swift 3.0

Nested collection view in table view is better or multiple collection view

I have to showcase some image with a little information like title and subtitle which will be horizontally swipeable. Basically, it will be like Airbnb app which shows the category and elements in it with horizontal swipe. The only difference is that in my case number of category(row) is fixed, which is 2. DataSource is same for both rows. I have two approach first is using two CollectionView and second one is by using a TableView and nesting the CollectionView inside tableview cell. Googled and get only the implementation part for both approach not the comparison or use cases for the approach. So my question here is, which process should I follow and why?
1) Using nested Collection view will make the code complex.Generally used only when cannot be implementable using table view.
2) Table view is similar to collection view just that it can be scrollable vertical not horizontal. This make table view easy to implement.
3) In your case collection in table view will work great. Row is fixed in that case you can use static table view.

Accordion for UIView and SubViews in Swift 3

I'm trying to build an accordion style ( expand/collapse ) list in IOS/Swift 3. Was confused on which approach to follow like a static UITableView ( since my sub divisions have different types of Ui Controls in the cells ie some have checkbox ,spinner, textview etc. with labels to show configure a list of different Valves) , UIView with nested UIViews sections with an option to clip views . But both have been messed up with without any success.
Illustration
http://imgur.com/a/Bs9SF
Below are the links I followed
https://github.com/justinmfischer/SwiftyAccordionCells
http://www.appcoda.com/ios-static-table-view-storyboard/
https://github.com/Weebly/TableSchemer
https://github.com/Alliants/ALAccordion
Any other approach without UITableView?
Please help . Thanks in advance .
Static vs dynamic table will depend on your data source. Does your data source for your table change? If so you'll want a dynamic table, if not then you can design it out in a static one.
As for the accordion feature, what I've done in the past is to add a tap gesture recognizer to the header view of each section. When the tap is detected I change my datasource and reload the table view. What happens is that number of rows for section is called on reload, and I return 0 so that none of the rows show. When tapped again you can go back to showing the normal number of rows.
To get the animation you need to use delete rows with index paths and animate it.

iOS Keeping section titles anchored in Grouped Table Style

I am using a grouped table view to display items on a view controller.
I want anchor the section's title just like it happens with the plani styled table.
How could I do that?
Ah, I know what you mean, my answer is no, you don't think you will be able to do that in a simple way. You might be able to do that with some workarounds using custom UITableViewCells and custom UIView's as the section's titles. I guess that way you could achieve that.

iOS table view - I don't know if this is even possible

In table view with many rows, is it possible to have the top row (row[0]) "frozen",
while the rest of the rows 'scroll' up an down.. If you have any hints about this, it would be appreciated..
The only way to do this would be to use a section header as the top row. Otherwise, do the top row as a separate UI element.

Resources