iboutlet

Assigning a IBOutlet in Objective-C

The code generator Accessorizer has an option to assign IBOutlets rather than retaining them. For example, compare these two generated lines: @property(nonatomic,retain)IBOutlet UIImageView *backgroundView; @property(nonatomic,assign)IBOutlet UIImageView *backgroundView; Why would I want to assign IBOutlets, while retaining all other ...

problem with IBoutlet UITableView connection

Hi,I'm having a problem with IBoutlet UITableView connection. It seems that the IBOutlet isn't connected to the TaleView. I set the delgate and the datasource to the files owner and set the iboutlet to the tableview in the nib. The tableview is well initialized. I just want to do some reloadData and it's not working. I try to do some de...

Get size of IBOutlet UIImageView

Hello, I need to get the size of an IBOutlet UIImageView drawn in Interface Builder. But if I read the IBOutlet UIIMageView.image.size.width or .height in the viewDidLoad, viewWillAppear or viewDidAppear method I always get 0 !!! Where (which method) and how (may be an other variable ?) can I get this information ? Thank you for your...

I can't seem to connecting any of my IBOutlets between IB and XCode.

I created a new iPhone project using the built-in "tab bar" template. I put a few sliders, labels, textfields in the view. I added in needed code for: "IBOutlet, @property, @synthesize, and release" for the above UI objects. It saves and compiles without any errors or warnings. I try to hook-up my connections with control-drag, but d...

UISegmentedControl deselect (make none of the segments selected)

Hi, in fact the title contains my question. I have a UISegmentedControl, and need to deselect currently selected tab. I tried: [menu setSelectedSegmentIndex:-1]; menu being the UBOutlet for uisegmentedcontrol but this gives me exception. anyone have some idea? thanks peter ...

UIViewController created with initWithNibName: bundle: or via an IBOutlet behave differently

I found a strange behavior, and would like to be explained what assertion I am making that is wrong. In an AppDelegate class of a freshly created WindowBased project, I am adding a UIViewController to the window. I can do it two different ways: - with an IBOutlet. In IB, I simply instanced an UIViewController, set its class to TestView...

How to do IBOutlets in MonoTouch?

I have done one iPhone app in Objective-C. When I want to link a Label to some data in that I would declare it like this: @interface CityDetailViewController : UIViewController { UILabel *cityName; } @property(nonatomic, retain) IBOutlet UILabel *cityName; And then when the CityDetailViewController object is created in code I would ...

How to get a compiler warning when an IBOutlet is disconnected

How can I have Xcode warn me if an IBOutlet of one of my objects is not hooked up to anything in a NIB? I can check that outlets are connected at runtime by adding assert(ofEveryOutlet); in awakeFromNib or viewDidLoad. But it's not as useful, or reliable, as having the compiler do the checking for me. ...

XIB-instantiated Object's IBOutlet is nil

I have a XIB set up like in this screenshot: File's owner is my main window controller. The XIB is also in charge of creating an object that serves as the delegate for the MGScopeBar view. As you can see in the screenshot, the scope bar delegate has an IBOutlet for the search field so that it can return it as an extra view as part of ...

Relation between Class (Type) & IBOutlet for Interface Builder Views

I just want to confirm that I'm understanding correctly, in Interface Builder the Class set under Class Identity (listed under Type in the name.xib summary window) is the class of the view whereas in IBOutlet Class *viewName the class listed describes the nature of the connection to Interface Builder, is this correct? e.g. Name________...

iPhone: custom UITableViewCell with Interface Builder -> how to release cell objects?

The official documentation tells me I've to do these 3 things in order to manage the my memory for "nib objects" correctly. @property (nonatomic, retain) IBOutlet UIUserInterfaceElementClass *anOutlet; "You should then either synthesize the corresponding accessor methods, or implement them according to the declaration, and (in iPho...

Interface builder problem: When hooking up an IBOutlet, getting "this class is not key value coding-compliant for the key"

Here is what I do: 1) Create New UIViewController subclass , tick with NIB for interface builder 2) In the header: @interface QuizMainViewController : UIViewController { UILabel* aLabel; } @property (nonatomic, retain) IBOutlet UILabel* aLabel; @end 3) In the .m #import "QuizMainViewController.h" @implementation QuizMa...

iPhone SDK/General Xcode question.

In the iPhone SDK, in my .n, I can say: -(IBOutlet) UITextField *MyNameIs; -(IBOutlet) UILabel *DisplayMyNameIsHere; } -(IBAction)PressButtonToDisplayYourName; Then in my .m, I'll do: -(IBAction)PressButtonToDisplayYourName { DisplayMyNameIsHere = MyNameIs.text; } But now how would I translate that to making a Mac applicatio...

when to use a IBOutlet?

I'm a little confused about the IBOutlet.Is it right I should use the IBOutlet when the variable will be changed in the nib? ...

Is it possible to access an IB object (say, a UILabel) without declaring a IBOutlet property?

I have more than 20 labels that I need to update at runtime, and I was wondering if it could be possible to access them without having to declare properties and outlets for all of them. I tried to assign a unique tag to each, and access them trhough the view in my view contoller, something like this: self.view.myLabel1.text = @"Some te...

IBoutlet , 2 Different ways to Write ?

Hi everyone, I am new to iPhone OS App development. Can somebody explain whats the difference between IBOutlet UIButton *myButton; @property (nonatomic, retain) IBOutlet UIButton *myButton; As far i understand the first line was used earlier and now we can use the 2nd line. Theres absolutely no need to write both of them. Any ide...

Xcode 4 - Connecting Outlets

This page shows how easily I can connect outlets http://developer.apple.com/technologies/tools/whats-new.html in Xcode 4, but I can't get it. I right click and drag an outlet from the new referencing outlet circle, and into my header where the object is declared, but nothing happens. Has anyone used this? Thanks a lot ...

How to construct IBOutlet names in code in order to change them?

Let's say I've got several UILabels which have been set up in IB and connected to IBOulets in code (label1, label2, label3, label4) How would I create these variable names within code, so that I could change the text of each one in a loop, where the labels are taken from a NSArray. Here's the pseudo-code: labelArray = [NSArray arrayWi...

Problem with sending data to Modal View Controller on iPhone

So I've got one main view with some images on it, and when someone touches one of the images, the image will return an ID number to this main view and then this view will present a modal view controller to display a larger version of this image. But the current way I'm doing it, the function on the modal controller is getting there befor...

NIB, setValue:forKey and retain (iOS)

I know about mechanism about outlet connection during loading NIB, but I have no sure. So I'm asking some questions to ensure my knowledge. I assumed these things all true, but It's hard to find mentioning about these on reference documentation. Please point wrong and right things. I have an IBOutlet defined like this: (Of course it's n...