Questions tagged [ibaction]

IBAction is a type qualifier used by Interface Builder to synchronize with Xcode.It is available in iOS 2.0 and later. The tags [UIButton] should be used to ask about Apple's UIKit frameworks UIButton action. Use the related tags [ios] , [UIButton] and [IBAction] for issues specific to those platforms.

IBAction is a macro defined to denote methods that can be referred to in Interface Builder.

As indicated in Apple's documentation, it is defined as void:

#define IBAction void

Relevant Stack Overflow question: IBOutlet and IBAction

891 questions
5
votes
1 answer

Why does Xcode 5 assistant editor defaults to .m file

I realized that when launching assistance editor while working on a XIB file no longer opens the header file by default, instead it shows the implementation file. Is there a new workflow going on I am not aware of? While in the implementation file I…
Mazyod
  • 22,319
  • 10
  • 92
  • 157
5
votes
3 answers

Xcode 4 control-drag won't create first IBOutlet or IBAction if '@end' is a header file's last line

I created an Xcode 4.5.2 project starting with the Single View Application for iPhone template. After adding a UIButton to MainStoryboard.storyboard, I'm able to control-drag from the button to ViewController.h's code to create a new IBOutlet or…
John Sauer
  • 4,411
  • 1
  • 25
  • 33
5
votes
2 answers

How to send user to Facebook page on button click

I'm new to iOS development so please bear with me.. I'm in the process of creating a simple app. There is a facebook button and I'd like that button to send the user to my facebook page, either in the browser or if they have the facebook app open…
Jeff
  • 121
  • 2
  • 6
4
votes
2 answers

How can i create `IBOutlet` or `IBAction` in custom class

how can i create IBOutlet or IBAction taking into account following conditions: IBAction or IBOutlet must be created inside my custom class (inherited from NSObject) NSButton instance is visible inside Interface Builder (XCode 4) In short i would…
xyz
  • 2,277
  • 2
  • 25
  • 41
4
votes
3 answers

What is the (id)sender for in -(IBAction)action:(id)sender;

Possible Duplicate: Objective C: what is a “(id) sender”? What is the (id)sender for in: -(IBAction)action:(id)sender; Thanks for your help!
Jack Humphries
  • 13,056
  • 14
  • 84
  • 125
4
votes
1 answer

Delegate and IBAction

They seem to accomplish the same thing in Objective C. What can one do without the other?
user4951
  • 32,206
  • 53
  • 172
  • 282
4
votes
2 answers

Dynamically / Programmatically assign IBAction to a button

For my project, I have created an ordering menu that programmatically creates buttons that scroll horizontally. However I am looking for ways to assign IBAction - specially action to write to Firebase database - to those buttons dynamically... …
user10482176
4
votes
7 answers

How to present programmatically a view controller from a UIVIew

I am using a Class which is a subclass of MessageView (Swift Message Library) which is inherit from UIView. Inside, I have a UIButton and I want to present programmatically another ViewController through it. Here is my code below : import…
Blisko
  • 107
  • 2
  • 9
4
votes
6 answers

Interface Builder will not see action methods

I am trying to hook up a UIButton to a IBAction in interface builder but IB will not show the method that I defined as an option to hook it up to. - (IBAction)someAction:(id)sender; That is what I have in the h file, and then in the M file I have…
Callaghan001
  • 55
  • 1
  • 6
4
votes
3 answers

IBAction func on button not triggering

I have 3 buttons in a VC, all hooked up to IBAction functions. Two of them work fine but the Submit button simply simply won't trigger. I have made sure User Interaction is enabled. I have also tried adding sender: AnyObject as a parameter and…
Mitchell
  • 333
  • 5
  • 20
4
votes
2 answers

When should I use anyObject insted of UIButton in swift?

When should I use anyObject insted of UIButton in swift? I am making an IBAction for my button that will be used to do more than on task on of the tasks is to switch to the next view.
4
votes
2 answers

Problems with keyboard functions?

I am having some trouble with the return key on the keyboard executing code. I have tried in the past and the following code worked perfectly fine: func textFieldShouldReturn(textField: UITextField) -> Bool{ textField.resignFirstResponder() …
Bigfoot11
  • 911
  • 2
  • 11
  • 25
4
votes
1 answer

How do I name and link an IBAction button created in a storyboard

I named the button "Reminders" Apparently it was supposed to link itself to the files but nothing showed up in mine. I have created a button in the storyboard but I don't know how to link it to a .m or .h file. I'm really new to this and still…
code101
  • 45
  • 1
  • 4
4
votes
3 answers

IBAction & Buttons programmatically

I'm creating buttons programmatically and I then want to add functionality whereby when they are tapped on/pressed, they stay highlighted unless tapped on again. What I'm doing now is creating the buttons and then trying to add an IBAction. However,…
David West
  • 552
  • 2
  • 9
  • 21
4
votes
2 answers

Button doesn't work after Xcode update to version 4.5

I have updated my Xcode and suddenly all Buttons, which are connected in the storyboard to the selectors, doesn't work anymore. All programmatically coded Buttons and gesture recognizers work. Partly, they are calling the same IBActions. What have…
BJS
  • 71
  • 3
  • 7