Other buttons in my view are being pressed on button press - ios

Something strange is happening in my app. I'm finding that when I press any button, all of the other buttons on my view are getting pressed. They all seem to be linked somehow.
There are no outlets connecting them to each other, they're not linked to the same function or anything. I can't figure out why this is happening? Any ideas why pressing one button will trigger a touchupinside event on another, unrelated button?
Thanks

I bet you created a button, added an action to it, and then duplicated it, dragged the copy to a new location, and added an action to the copy. Then you continued with that process.
Go to the "connections inspector" tab on the right (The circle with an arrow on it). Select each button. I'm guessing that you have multiple actions on each button. (A button can contain multiple actions.)

Related

Swift 2 - Simple Navigation With UIButton

I'm trying to write my first iOS app, but I'm having trouble with a simple problem. I want to figure out what's going on... can you please write me a simple code which can help me a lot?
Let's say I have 3 different UIViewControllers. One is the MainPage which contains 1 UIButton: "Food" If I click on this the FoodPage opens which has 2 buttons "Pie" and "Pizza" if I click on "Pizza" the PizzaPage opens if I click on "Pie" the PiePage opens. Both of PiePage and PizzaPage have 2 buttons one for FoodPage "Food" and one for MainPage "Main".
Can you please write me a code or give me some idea how to do something like this?
Thank you!
Go into main.storyboard.
Lay out the views.
Hold option, and left click and drag a button to the view you want to have it show. (If you have a mouse, you can right click and drag the button to the view)
The Action Segue options should show up. Hit "show". Now you're button will load that view controller.
Below I am dragging the cancel button to show the previous view controller.
Good luck.
Click here to see what it looks like

Xcode -- Alternate options for control+drag in story board to create a control segue for button

I am working on ToDoList app in IPAD.
I am getting problem to control+drag the button(Done, Cancel) to point to the "Exit" button in the bottom due to scroll issues.when i zoom-in in the story board for "Add To-Do Item" screen.I cannot see the below green button to connect due to scroll issues.
Will there be any other way i can point the "Done" or "Cancel" button clicks to unwindList segue.
Please provide me with any way to solve this issue.
Open the storyboard, click on the little icon in the lower left corner called "Show Document Outline" . You will see a list of elements with their names there. Control-Drag from the desired button name to Exit.
Also, right-click any view (including a button) will pop a small window with a full list (outlets and all). That window can be moved and dragged, so you can place it next to the green 'Exit' and drag from there. This comes handy when you need to control-click-drag from/to views that are far or tricky (without dropping it in the wrong place).
I think 'Touch up inside' is the click gesture.

Right key invisible on a UItablewView... into Storyboard

If it was a problem of code, seems to need a clean!!!
I however have made all clean procedure, but the problem is there...
The problem: I have added a right button (Tab Bar button) to a top Bar.
The left (back) goes perfect, but I cannot view the right button... He disappear when I make a build and execute the app!!!
Some idea?
Ps. In other UITableView of the project I have normally two buttons.

iOS "Done" button to dismiss modal or to complete Edit?

In iOS, I have some modal scenes that dismiss with a "Done" button in a toolbar.
But one of those modal scenes includes an editable UITableView. So I also have a standard Edit button (in a NavBar). While Editing, that button is renamed "Done" (and highlighted in blue).
Now there are two buttons labeled "Done" that do two very different things. I could rename the dismisser to "Cancel", but that seems like a non-standard usage. And it would be at odds with the other scenes (that don't involve editing), which dismiss via a "Done" button.
Is there a Human Interface recommendation? What's the "cleanest" solution?
The easiest solution is that your "Done" (dismiss) button is not displayed while editing, so that it looks like this:
Not editing: ....[Edit][Done] <- (Done-dismiss)
Editing: ..............[Done] <- (Done-editing)
Another thing you can do is set the "Done" (editing) button on the left side (as well as hiding the "Done" (dismiss) button), so that the user notices it's a different type of "Done"
Note: From a UX point of view, showing two "Done" buttons that look identical on the same view at the same time is very wrong, even if they are in different positions

Xcode: alternative way to create segue from control not using Control+drag?

I am running Xcode 4.3.3 over a VNC connection to a Max OSX box where Control+drag does not work. I would like to create a segue triggered from a button on the first scene. The usual way is to do control+drag from button to second scene but that does not work because of VNC. Is there an alternative way to do this? For creating outlets there is a workaround by right click on a control and dragging from the list of events to VC's sources code. Is there similar workaround for triggering segues?
Thanks.
if it's a UIButton, right click on it, you'll see a triggered segue option. Click on the round circle on the right side of it and drag it to the destination.
If it's a viewController, right click on the ViewController thing next to the First Responder (Orange box), you'll see also triggered segue option. Click on the round circle on the right side of it and drag it to the destination to create a segue.

Resources