How to access UIImageView added to storyboard

I am new to iOS programming, however I have a lot of experience with Swing, WinForms, WPF and HTML / CSS / Javascript.

I dropped UIImageView on the bulletin board and set the original image using the attribute inspector. So far, this is the same as with NetBeans or VisualStudio.

However, when I open the view controller for the storyboard, there is no link that I can see for the UIImageView so that I can programmatically manipulate.

In NetBeans (Swing) or VisualStudio (WinForms or WPF), there will be a variable created in the "code behind".

My specific question is how to get a link to a UIImageView for control via Objective C.

+4
source share
2 answers

So that your code can send messages to the user interface object, create a connection from the user interface object to a socket in your code . The easiest way is to drag an object from the Interface Builder interface to the implementation file in the editor assistant.

enter image description here

Apple has an excellent article with screenshots: Creating an output connection

+4
source

XCode Storyboarding - "Suit and Tie". . UIViewController, .

, UIImageView .h .

@property (nonatomic, retain) UIImageView *myImage;

ViewController " " "myImage" UIImageView.

+1

Source: https://habr.com/ru/post/1530496/


All Articles