Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Can't connect a button\label with variable\outlet in storyboard

I created 2 View Controllers: on the first I created a button when click on it you will open another View Controller with button and label. I already created outlet and variable for them.

My question is: when I'm trying to connect the button\label with variable\outlet I can't see selection around the button\label -> I mean that I can't connect them all. Why?

P.S. DON'T PUT A MINUS I JUST NEW PROGRAMMER!

like image 289
Vladimir Avatar asked Sep 18 '12 21:09

Vladimir


1 Answers

Can you post your IBOutlet declarations? You have to declare UIButtons like this to make them work (connect) in Interface Builder :

@property (nonatomic, strong) IBOutlet UIButton *aButton;

For a label its just the same :

@property (nonatomic, strong) IBOutlet UILabel *aLabel;

I think you have either forgotten to write IBOutlet or your variable type is wrong.

like image 181
Kai Engelhardt Avatar answered Oct 05 '22 23:10

Kai Engelhardt