I haave to implement 3 seperate forms, but they have headers which make the forms collapsible when clicked.
When searching online I saw the expanding rows for UITableView. Is it possible to add a custom form view in the expanded view of the tableView? Or do I try another approach with 3 hidden views that appear when each of the header sections are selected?
I always use UIStackView inside my cell. And when user click expand button, i unhide views and call tablewview.reloadData(). This is my approach
You can use 3 stack views. Each stack view will have a heading label and a tableview inside it. By default all the tableviews are hidden and heading label are not hidden. Add a tap gesture to heading labels. Whenever user taps a heading label you can unhide the respective tableview. You can give tags to each heading label and tableview so you can identify which heading label is tapped, like if a user tapped heading label with tag 1, you will unhide the tableview with tag 1.
Related
I have a implemented a drop down menu above my UITableView and when I click on it I want my table view to go down inside the items of my drop down menu, because right now when I click on my drop down menu, the tableview stay where it is..
i have a view above my prototype cell that contain my drop down menu but I can't put any constraints on it... when I click in "filtre" I want this to happen : image description here
it looks like you added a Table Header view. it is a little different than common UIView.
Instead of changing Height constraints, you'd better to change the frame of the headerview
how-to-set-the-height-of-table-header-in-uitableview
In addition, you can found good codes of dropdown implementation from these links.
https://github.com/qmathe/DropDownMenuKit
https://github.com/onmyway133/Dropdowns
I have a collection view 3x3.
Item (collection cell) contains some icon and label.
I want some additional text to be shown inplace when user touches the cell. The view with this text must be fullscreen width.
In other words I want to insert a view with text between collection rows. It's desirable that the view appears with animation.
How should I do that? The first ideas I've got are:
Divide CollectionView rows into sections and use section footer for this purpose. Make this footer of zero size and show it when needed.
Dynamically create full-width cell and insert it at the end of the row where selected item is located.
Both methods seems tricky to me. Maybe there is more straight forward way?
Any ideas? Thanks!
I'd like to place a button at the top of a UITableView or UICollectionView, but only shown when swiped up beyond the first row. Usually you see scroll to refresh or a search bar there, but I'd like to put a button there for another functionality. How can I do this?
Put the button on your first row and the rest of the data after. Set an inset on the tableview so the first row is hidden until the user scrolls.
I have the following issue:
I have a parent view. Inside this is a scroll view with different text fields and labels. When a text field is being edited, I reposition the text field to the top of the screen so that the keyboard does not hide the textfields.
One of the text fields has a table view below it which is used a dropdown. when text is entered, it shows various results dynamically. This table view is also added to the scrollview. This is not a recommended and also does not work. So how can I achieve this whitout using scrollview?
As #hackerinheels has mentioned above, use this method to reposition elements, so that the keyboard does not obstruct your text fields.
Avoid using scrollview for repositioning, as adding tableview inside scrollview is problematic.
Xcode/iOS5: Move UIView up, when keyboard appears
Has anyone seen a script like this or would be willing to help out with one?
Collapse/Expand Button
The uitableview cell to be expanded partially open (giving a preview in essence)
After the button is pressed then the cell of table would expand to show the entire contents (with a nice fade effect). If you chose to collapse the cell then it would return to the original offset (preview) height.
Has anyone seen anything like this? I've found a plethora of these scripts that fully expand or collapse, but not like this
Thank you for any help!!
you have to make custom cell class. While creating cell give the height of the cell as maximum you want (i.e when it expands) and when creating the custom cell drag a UIView and put all the contents in this view and hides this view. Then when button is being Tapped just you have to make it unhidden.