1

Stupid and simple question, but I have to ask.

I dragged on Storyboard a button. How to get access to it? With drag "Ctrl" not offer. How do I do it programmatically change setVisible(Yes/No)?

2
  • What are you actually want? Commented Dec 17, 2012 at 11:07
  • I have Storyboard. Button on it. How to bind a button to (UIButton *myButton). Commented Dec 17, 2012 at 11:11

1 Answer 1

2

You need an IBOutlet to your UIButton

in your view controller h file

IBOutlet UIButton *mybutton; @property (nonatomic, retain) UIButton *mybutton; 

in your m file

@synthesize mybutton; 

and then you should be able to do:

[mybutton setAlpha:0]; 
Sign up to request clarification or add additional context in comments.

2 Comments

I have a lot of buttons. How can I distinguish between them? I need access to a single button.
Make multiple uibutton IVARS UIButton *mybutton1, *mybutton2 etc then you can link them in the storyboard appropriately

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.