In iPhone UIImageView, which method to override, for example, the init variable?

I have a very simple application that handles a derived view of a UIImageView.

The view has an array of rectangular coordinates that act like buttons.

Since this is a simple application, I handle all touch events right in my derived UIImageView class.

I need to initialize an array of image coordinates, which is an instance variable.

I tried to override several methods, including init, but none of the ones I tried are called.

What is the correct override method for initializing instance variables in a UIImageView derived class?

Thanks!

+3
source share
2

init (initWithFrame, initWithCoder ..), , . NIB, initWithCoder.

viewDidLoad . , , .

+5

, AwakeFromNib: nib.

+1

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


All Articles