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
-2
votes
1 answer

How to thoroughly delete the IBAction associated with a line in Xcode?

How can I thoroughly delete the IBAction associated with a blank line in Xcode? That line is in line 40, there’s no any association with my UIButton with line 40. I tried to press the delete key, then the black point disappeared, but after I click…
Sunshine
  • 1
  • 1
-2
votes
2 answers

"only instance methods can be declared @ibaction" error

This is the problem: @IBAction func signInTapped(_ sender: Any) { I keep receiving "only instance methods can be declared @ibaction" error. Help me fix this. Please don't suggest to remove "@IBAction". Thank you. This is the whole messed up coding…
Mar Dillo
  • 121
  • 1
  • 4
-2
votes
1 answer

Hyperlinking a button

I am trying to create a button that goes to a link when pressed using Swift 3. When I run the app and click the button, nothing happens. Here is the code for the button's @IBAction: @IBAction func facebookButton(_ sender: AnyObject) { if let url…
hchu
  • 1
  • 1
-2
votes
3 answers

when button is selected, there should be a new view loaded

this is my first time in stackoverflow and I'm pretty new to this Objective C language. What would be the best solution in order to load the page in one View Controller? References are welcome and I really new great coder's help :( some say when…
-2
votes
1 answer

IBAction Triggered By Time

What I want is an IBAction command in Xcode that is automatically triggered every second. It would perform similar to a button, triggering a set of commands. Thanks for your time, jjj
jjj
  • 23
  • 1
  • 4
-2
votes
1 answer

Is there a way to shorten if-statements?

I am wondering if there is a way to the following code shorter. I have done this same type of thing for other Xcode projects in the past and it has been very time consuming. Here is the code: @IBAction func flashButton(sender: UIButton) { …
Bigfoot11
  • 911
  • 2
  • 11
  • 25
-2
votes
1 answer

No effect for IBAction in viewDidLoad?

When I press my button, nothing happens. How can I fix this? And the integer x is declared in the .h file. Edit: the button defines a value for x , and as you see in the code , x is added to the rotation duration. When I press the button , the…
Joseph
  • 149
  • 1
  • 2
  • 7
-2
votes
3 answers

Button going through all if statements on 1 button press - objective C

My apologies if this is a simple thing to do, i am still new to objective C. I have a button which I am trying to change the image and text of each time it is pressed, but my issue is that it is going through every if in one go till the end of the…
Manesh
  • 528
  • 6
  • 20
-2
votes
2 answers

Within an IBAction, "self" refers only to the first instance of an object

This is a basic Objective-C question, but I'm mystified and I haven't found an answer elsewhere. I have a custom class we'll call MyObject. In my MainMenu.xib, I have a a button which triggers an IBAction within that custom class. In the same NIB…
user1912017
  • 7
  • 1
  • 2
-2
votes
2 answers

Action Button calls multiple methods, how can i insert a short pause between them?

I have an iOS Xcode question I'm hoping someone can help me out with. I have a simple action button that invokes a series of methods to run, however these methods all write to a stream and retrieve the input that comes in return, so I'm having a…
user3763291
  • 55
  • 1
  • 5
-2
votes
2 answers

I need to add a integer and the number 1 every time a button is pressed

- (IBAction)sneezeButton:(id)sender{ int n = 1; int sneezes = [PFUser currentUser][@"sneezes"] + n; } I have an error coming up stating "Arithmetic on pointer to interface 'id',which is not a constant size for this architecture and platform." Do I…
-2
votes
2 answers

iOS, How to call IBAction inside UIAlertView?

What I want to call an IBAction when a user clicks on "YES" in UIAlertView, for that I have: - (void) alertView:(UIAlertView *)alertView clickedButtonAtIndex:(NSInteger)buttonIndex { if (alertView.tag == 12) { if (buttonIndex == 1) { …
-2
votes
2 answers

I can't figure how to fix this Expected identifier or '('

- (IBAction)SignUp:(id)sender; { Expected identifier or '(' IBOutlet UITextField *Firstnamefield; IBOutlet UITextField *Lastnamefield; IBOutlet UITextField *emailfield; IBOutlet UITextField…
-2
votes
1 answer

Changing 3 different button names when a 4th button is pressed - Objective C

Ok i have edited my original post. Questions was: I have a button that once clicked 3 other button names will change. from sin to sin-1 from cos to cos-1 from tan to tan-1 As you can tell i am doing a scientific calculator. So far i have declared…
Maciej Cygan
  • 5,351
  • 5
  • 38
  • 72
-2
votes
2 answers

Stop IBAction from another Button Objective-C

I do not know how to stop the IBAction. What I need: I press the button, and then call the IBAction that runs about 5 minutes. I want to make the cancel button, when pressed, will stop IBAction from the first button. How do I do this? Code: -…
IlyaKharlamov
  • 479
  • 1
  • 4
  • 10
1 2 3
59
60