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

Is @IBAction just a syntax in Swift or does @Something mean a particular thing in Swift?

Is @IBAction just a syntactical difference in Swift or does it signify something specific. Also, similar usage is seen in AppDelegate.swift where @UIApplicationMain is written.
Anuj
  • 6,987
  • 3
  • 22
  • 25
3
votes
2 answers

$T4 does not have a member named Generator ERROR swift

@IBAction func button(sender : AnyObject) { var videoConnection : AVCaptureConnection! videoConnection = nil var connection : AVCaptureConnection var port : AVCaptureInputPort var stillImageOutput : AVCaptureStillImageOutput? …
Jim
  • 33
  • 6
3
votes
1 answer

Why IBAction called before viewdidload?

I have a IBAction method which is called when a button touched. But when the UIViewController is called, that IBAction method is called first before viewdidload. I checked my code, there is nowhere that I call IBAction method specificly. What is…
user3309441
  • 107
  • 11
3
votes
7 answers

iPhone: IBAction Causes "Unrecognized Selector Sent to Instance" Error

I'm working on my first real iPhone app, a simple To-Do list application to help me organize stuff, except I'm getting an "unrecognized selector sent to instance 0x". Specifically: 2010-02-20 14:30:09.200 ToDoApp[88562:20b] *** -[NSCFDictionary…
Althane
  • 103
  • 2
  • 3
  • 13
3
votes
1 answer

IBAction methods declared in a Protocol are not visible in Interface Builder

I have defined an objective-c protocol that declares a method that is tagged with IBAction. I implemented a UIViewController that implements the protocol. In Interface Builder I created a nib file with the UIViewController as the file's owner.…
Marc
  • 233
  • 4
  • 6
3
votes
1 answer

Wierd behaviour for UIButton setHighlighted after the button is set selected

My question is simple: I am creating a UIButton with resources for normal, disabled, selected and highlighted, in other words, all the controls I have access to. The problem is that, if for some reason I choose to set the button to be selected, and…
Durican Radu
  • 1,327
  • 11
  • 12
3
votes
3 answers

Should I put IBActions in the header file or not?

Given that iOS SDK 6.1 is used in Xcode 4.6.3 , does it make a difference to declare the method signature of IBAction in a header file or not? Without putting the method declaration in the header file, the app is still able to compile and run…
Raptor
  • 53,206
  • 45
  • 230
  • 366
3
votes
1 answer

Animate UIButton Down - Xcode

I wanted to know how I would go about animating a UIButton down when clicked via -(IBAction) Thanks in advance!
Mina Dawoud
  • 408
  • 8
  • 22
3
votes
3 answers

What order do two IBActions fire when called from the same component?

I have a UIButton and I am trying to call 2 different actions from one UIButton event, since that button needs to do two things, but I need to do them in a certain order. No matter how I try, I can't seem to change the order in which the Actions…
Dummy Code
  • 1,858
  • 4
  • 19
  • 38
3
votes
5 answers

self IBAction and sender

I am a newbie iOS programmer, here is my question: I have mapview and segmented control, also changeMapType function which get called when UIControlEventValueChanged occures, like this // change map type with segmented control -…
smoke
  • 67
  • 1
  • 6
3
votes
2 answers

iPhone: IBAction Causes “Unrecognized Selector Sent to Instance” Error

I am developing an iphone application where you log in a server and after you get validation my app moves you to another viewcontroller where you can use a button to send your gps location. For some reason when I press a button in my next…
3
votes
1 answer

How do you "abort" a method in Objective C?

I know there are ways around this, but I would like to know if the following question is possible. Can you "abort" a method in Objective-C? In this case it is on Cocoa Touch. I have an IBAction. In that action I have in if/else if/else statement. If…
Josiah
  • 4,663
  • 2
  • 31
  • 49
3
votes
3 answers

How to create buttons which are activated when the user slides their finger over them on iPhone

I'm writing an iPhone application which has a piano like interface. The user is presented with a number of large buttons with no spaces between them. At the moment I've created IBActions in Interface Builder by right mouse dragging the buttons into…
James Andrews
  • 3,257
  • 3
  • 31
  • 45
2
votes
2 answers

Variable out of IBAction

I have problem that im trying to get solve for like week. My goal is to get variable out of my IBAction, to use for example in -(void)viewDidLoad.. But as far as I am now I can use my variable only in my IBAction.. - (IBAction) changeLat:(NSNumber…
Edgars
  • 140
  • 1
  • 11
2
votes
3 answers

IB Connections in Xcode crashing

I was working on my iOS app last night when I went to test it and it crashed on startup. I wasn't even working on the nib that is causing the crash. Anyways, here is the error code: 2/29/12 10:32:05.291 AM Safe Flight: *** Terminating app due to…
Boos1993
  • 99
  • 9