I'm using an UITableView with the following setup:
normal mode: detail disclosure button
edit mode: disclosure indicator
If the table is in edit mode and I select the row, the pushViewController(nextViewController,animated) is called.
But now my problem: During the animated change of the view controller, the disclosure button changes to a detail disclosure button.
I think you'll find that iOS cancels "editing mode" before it pushes the next view controller.
Related
I have a side swipe menu implemented for a UITableView using UITableViewRowAction. I would like to add a "Done" button to this menu and have it visible while the user is editing a cell. Once "Done" is pressed, the action would complete normally.
Can I programmatically present UITableViewRowAction for a specific table view row?
or
Can I have UITableViewRowAction stay visible after user taps one of its buttons?
My question is very similar to this:
Disclosure Indicator doesn't call seque while Detail Disclosure does
But is a bit different.
The same is happening to me. I have a dynamic table view which loads some rows at viewLoad.
So I set the segue from the Cell to a new View which will show some details of the item. I also set the Segue to Push.
When I do that, the Cell automatically sets its Accessory to Detail Indicator (So the blue info button appears) This works fine, I click on the info button and it loads the new view. But I do not want that, I want the Cell to have a Disclousure indicator (the arrow) and whenever you click on the entire row, just Push the new view. I did this on an Static Table View and it worked fine, but I can't make it work with a Dynamic Table. Nothing happens when I click, just the animation of the tap and nothing else.
No, it's not ok to change an accessory action segue to a selection one by setting the accessory to none -- that doesn't change the segue type. The fact that you got the blue button when you made the segue means you chose an "Accessory Action" segue. When you drag from the cell to the next controller and let go, you get a menu of choices that's divided into two sections. The top ones are Selection segues, and the bottom set are Accessory Action segues. You need to delete your segue and remake it, being sure to choose from the Selection segue choices.
Is it possible to do that?
It appears impossible to drag from the disclosure indicator on a tableViewCell prototype to a viewController to create a segue.
How can I do that?
control + click on disclosure indicator connect to viewController you will get a menu like this
select the accessory action
Lately, when I try to add a seque to my UITableView cell using the storyboard:
Xcode is auto-adding an info icon / "Accessory Button" to the cell:
I know I can remove it like so:
However, there appear to be other issues that might also be symptoms of whatever is causing this behavior, but that's a separate question... My question here is why is Xcode adding it in the first place? It's never done this before when I've added storyboard seques...
During creation of the segue you have selected "Accessory Action" in the segue action popover. If you do this Xcode will set the accessory to "Detail Disclosure", because you need a tappable accessory to have an accessory action.
Select a Segue in the upper part of the popover. Those are Selection Segues, which are triggered when you select the cell.
This does explain your other issue as well. Because your segue is connected to the accessory, which you remove. So there is no way to actually trigger your segue.
Select the cell and go to the attributes inspector
Scroll down to Accessory
In the drop down menu you will be having etail Disclosure selected
Change it to Disclosure Indicator
There are two different behaviors for the segues.
You can see them on your inspector: triggered segues.
If you choose the accessory action, Xcode automatically add an accessory button (the circle).
If you choose the selection action, you have no accessory button.
Here is my current problem. I have a UIViewController setup with its data and everything on a small sized view controller. What I am trying to see is if it is possible to connect that to a separate view controller. For example I have a view controller that has a user click a button. Upon pressing the button the UIPicker ViewController would pop up from the bottom and I could go from there. I know how to enable this if the picker is on the same view controller. However, I have no idea how to if its on its own ViewController. Any ideas?
One way to do this would be to put the picker view on the same view controller and make it hidden, and, when they press the button, unhide it or load the other view controller when they press the button; this will display the other view controller, not what's on the current one.