Questions tagged [iboutlet]

The type qualifier IBOutlet is a tag applied to an instance-variable declaration so that the Interface Builder application can recognize the instance variable as an outlet and synchronize the display and connection of it with Xcode.

An outlet is an object instance variable — that is, an instance variable of an object that references another object. With outlets, the reference is configured and archived through Interface Builder. The connections between the containing object and its outlets are reestablished every time the containing object is unarchived from its nib file. The containing object holds an outlet as an instance variable with the type qualifier of IBOutlet.

Example:

IBOutlet NSArray *keywords;

Because it is an instance variable, an outlet becomes part of an object’s encapsulated data. But an outlet is more than a simple instance variable. The connection between an object and its outlets is archived in a nib file; when the nib file is loaded, each connection is unarchived and reestablished, and is thus always available whenever it becomes necessary to send messages to the other object. The type qualifier IBOutlet is a tag applied to an instance-variable declaration so that the Interface Builder application can recognize the instance variable as an outlet and synchronize the display and connection of it with Xcode.

903 questions
4
votes
2 answers

Error after connecting IBOutlet to UITextField

I'm getting this weird error when I connect an IBOutlet to a UITextField. It's really weird because it's only happening in this one view controller. I have two other view controllers almost identical to this one, and they function perfectly. I have…
Jacob
  • 2,338
  • 2
  • 22
  • 39
4
votes
4 answers

Is it possible to use something like an IBOutlet array?

I have a top list view in my current iPhone app, that's populated by code. I've assembled the view using Interface Builder, so it contains lot of UILabels. Obviously I wouldn't like to have name1, name2, etc. outlets in my class, but prefer a…
shinjin
  • 2,858
  • 5
  • 29
  • 44
4
votes
3 answers

How to keep IBOutlet property from being released (iOS using ARC)

I am implementing the AQRecorder class from Apple's SpeakHere example into my project using ARC. To get it to compile, I had to create a class (AQRecorderController) that controls the AQRecorder instance (equivalent to the SpeakHereController in…
rmooney
  • 6,123
  • 3
  • 29
  • 29
4
votes
2 answers

IBOutlet should be weak?

Possible Duplicate: Should IBOutlets be strong or weak under ARC? I read about ARC briefly and thought ok, everything is strong and delegate is weak. Now I'm creating a view in interface builder and making IBOutlets, and Xcode's default setting…
eugene
  • 39,839
  • 68
  • 255
  • 489
4
votes
1 answer

iOS Storyboard - Custom Outlet from a ViewController to another?

I am trying to implement something similar to AplitView where you can hace separate scenes in storyboard and connect a viewController to another one as an outlet. Is this possible? @Interface MenuNavigationController :…
aryaxt
  • 76,198
  • 92
  • 293
  • 442
4
votes
1 answer

Manage UITableView with custom UITableViewController created programmatically

I'm using XCODE 4.2 on iOS5. I have created a UITableViewController custom, called picker. This is the class content: NSMutableArray *_nameCollection; NSMutableArray *_imageCollection; With 2 elements each. That works well. If I create…
vgonisanz
  • 11,831
  • 13
  • 78
  • 130
4
votes
1 answer

Can multiple buttons have one outlet?

Is there is any way to connect multiple UIButtons to one IBOutlet? I want to to do this so I can disable and change the alpha setting for a couple buttons at the same time rather than having an outlet for each button I want to modify.
Joey
  • 1,144
  • 3
  • 15
  • 29
3
votes
2 answers

xcode NSString IBOutlet to NSString Object in designer?

I have a UIView extended class which has an extra NSString property. For convenience I'd like to somehow set that property in the designer, if possible. @property (nonatomic,retain) IBOutlet NSString* designerAccessibleString; The property will…
Ivan Dossev
  • 565
  • 5
  • 11
3
votes
2 answers

iOS - Interface Builder Outlets Not Initialized

I have created a view in Interface Builder with some labels and text as IBOutlets. I can view this screen perfectly when I segue to it from another view that I have defined in my Storyboard. However, I have another XIB and an associated…
Brian Boyle
  • 2,849
  • 5
  • 27
  • 35
3
votes
1 answer

IBOutletCollection - hooking up multiple objects at once

I've been using IBOutletCollections to apply the same behaviour to many objects which are hooked up in IB. This is a great time saver, but it still takes a long time to individually make the connection between each object in IB and the…
beev
  • 1,197
  • 2
  • 16
  • 33
3
votes
2 answers

What is the difference between IBOutlet as a property or as a variable?

There are two different methods to declare IBOutlet. In @interface section as variable: IBOutlet UIButton *exampleButton; Below the curve bracket but before @end of .h file as property: @property (nonatomic, retain) IBOutlet UIButton…
LIAL
  • 1,624
  • 4
  • 24
  • 30
3
votes
3 answers

is it good practice to use lots of IBOutlets?

I'm still quite the beginner at iOS and so I've been doing lots of tutorials, lately. Let's say I was making an app such as a calculator, with let's say 24 buttons. I've seen example code where the button's label gets used to figure out what button…
Dave Kliman
  • 441
  • 4
  • 17
3
votes
4 answers

Why insert action appearing and not iBoutlet?

Why is my IBoutlet not showing when I try to link a text field to the swift controller view it says insert action instead of IBOutlet. I'm not trying to add an action what is wrong with this new update Is anyone else having this issue.
user12681813
3
votes
1 answer

Bindings vs IBOutlets in Objective-C/Cocoa

I'm going through a simple Objective-C/Cocoa program to try and learn the language and am getting a little confused about how some things are linked from the code I write to the interface builder. For example, I have a simple NSString: @property…
JPC
  • 8,096
  • 22
  • 77
  • 110
3
votes
3 answers

Multiple UIButtons 1 function

Basically I need to have several buttons in a view. I would like them to all call one function so that I can keep track of a 'state'. How can I tell which button called the function? Is there anyway to get the text of the sender?
Critter
  • 462
  • 1
  • 3
  • 14