So each row has the same button and I want that button to scroll to the next row.
In tableView, you can set each button has different tags(button.tag). When you selected it, use tag to decide which row you will scroll to.
Related
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.
I have list of 5 button in each row for UITableViewCell
Total number of row count is 2.
If I select the first button in first row or second row then the other button of the same position should be deselect in another row vise versa
Please find the attachment:
1 way:set relationships between your buttons and their owner cell. Reload layoutsubviews of cell to set its buttons' image.
2 way:set Tag for each button and reset corresponding button image in one button's action target.
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 a UICollectionView with one section, 10 cells and horizontal scrolling using a Flow Layout.
One cell occupies the entire screen, and has a UITextView and two UIButtons.
How can I prevent scrolling if no button in the cell is selected, and if it is selected, how can I scroll to the next cell on a UIBarButton click?
I would also like to preserve selection in order to be able to go back to the previous cell and change the selection if needed.
i have two views in a UIScollView. the first view is a normal view and the second view is a tableview.
i want enable swipe to delete a row in the tableview just when someone swipe from right to left. if someone swipe from left to right you will see the first view.
swipe to delete a row is just possible when the scrollenabled of the UIScollView is NO.
I have no idea when set the scrollenable no or yes.
is this even possible?