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
4 answers

User Interface commands skipped in IBAction

Here is my code: -(IBAction)saveDownloadedImage { NSLog(@"Test"); EXECUTED indicatorView.hidden = NO; NOT EXECUTED [indicatorView startAnimating]; NOT EXECUTED [statusLabel setText:@"WHY?"]; NOT EXECUTED [currentPicture…
gsach
  • 5,715
  • 7
  • 27
  • 42
2
votes
2 answers

Buttons not working in IOS5

i built an app on ios 4.3 and it worked fine but when i run it on the new ios the back buttons dont work. Heres my code to go to the next xib: -(IBAction)Selection3Page:(id)sender;{ //show next view Selection3Page * nvc = [[Selection3Page…
user975767
  • 51
  • 1
  • 6
2
votes
3 answers

How to tell programmatically if a IBAction has been called by code or by user action

How can I tell programmatically if a IBAction has been called by code or by user action. Eg I have a method, -(IBAction)someMethodWithIts:(id)sender which I have linked to a valueChanged on a UISegmentedControl. It can be called by, User changing…
Sam Jarman
  • 7,277
  • 15
  • 55
  • 100
2
votes
2 answers

Can I have multiple UIAlertViews for one IBAction in Xcode?

Is it possible to program multiple UIAlertViews for one IBAction in Xcode to show at random. For example: I am making an app with multiple questions shown at random, when the submit button is pressed, an alert is shown saying if the answer is…
cory ginsberg
  • 2,907
  • 6
  • 25
  • 37
2
votes
3 answers

UIButton actions set in XIB but not firing

Problem description is brief but I think I don't need to say much. When I load my custom movie player's .xib, the UIButton/UIBarButtonItem controls are set to ivars/properties of my File's Owner object, and they also have their actions/selectors set…
user244343
2
votes
1 answer

How to get a button sender id? in SwiftUI

Button(button1Name, action: messageMe) .frame(minWidth:0, maxWidth: 300) .padding() .foregroundColor(.white) .background(Color.gray) …
Daniel
  • 31
  • 4
2
votes
2 answers

iOS: Implementing UITabBar from User Interface without a UITabBarController

In my app I have a UIViewController to which I wish to add a UITabBar. So I have added it via User Interface (into the UIViewController.xib file) and created instances of the IUTabBar and the UITabBarItems within the UIViewController.h+m files. in…
Ohad Regev
  • 5,641
  • 12
  • 60
  • 84
2
votes
1 answer

Toggling MapKit Overlays On/Off by pressing the same button?

I have a MapView with a toolbar button that when pushed adds overlays to the MapView. What I would like is for the button (IBAction) to check to see if there already are overlays on the map and if there are remove, if there are not, to add them. My…
Bradley Davis
  • 19
  • 2
  • 7
2
votes
1 answer

Swift If you specify a non-nil format dictionary in your settings, your delegate must respond to the selector captureOutput:didFinishProcessingPhoto

The code I am using below is supposed to take a photo and then convert the image to base64 in order to send it to a server. The code worked taking the photo, converting it to base64, and uploading it to my server but has stopped working. I have…
Python 123
  • 59
  • 1
  • 13
2
votes
3 answers

Issues in setting UIButton title in its click event

I'm trying to change the title of a button when the user press on it with the following code: - (IBAction) hideKB: (UIButton *) sender { sender.titleLabel.text = @"↓"; } But when I click the app crashes and I can't understand why. Removing the…
Francesco
  • 1,047
  • 11
  • 26
2
votes
1 answer

UISwipeGestureRecognizer Not Getting Added To View

I'm trying to add a swipe gesture recognizer to my view. Here's a snippet of code from my viewDidLoad()method of the main view controller file: self.view.addGestureRecognizer(UISwipeGestureRecognizer(target: self, action:…
nicog
  • 102
  • 9
2
votes
1 answer

iOS: Click events not being triggered only on iOS 13

I have an issue with the button click events on an old app. Everything works OK for iOS versions < 13, but on iOS 13 the button clicks are not working. This is the code that generates the buttons: override func layoutSubviews() { …
Laura
  • 2,653
  • 7
  • 37
  • 59
2
votes
7 answers

a button in UITableviewCell

I have UItableViewCell created with a nib file, and have put in my cell a button. i hace created an IBAction to associate an action when the the user click the button.but i have a crash and i don't know what it is the problem, i have set all the…
izan
  • 727
  • 2
  • 11
  • 22
2
votes
1 answer

Count user login attempts using IBAction button

I want to count how many times login button is clicked. If username and passwords field are empty and login button is clicked I want the count to be incremented by 1. As I can not take "count" as inout parameter in this IBAction function, how can I…
2
votes
1 answer

How can I change the action of an IBAction button using a swift statement correctly?

I brought this up in one of my other questions, but I'm working on a text based adventure game designed for IOS. One of the things I'm working on is to give a button multiple different functions under specific circumstances. I read in a handful of…