rishu1992
rishu1992

Reputation: 1434

iOS: Creating many IBOutlets has performance overhead?

If we create many IBOutlets from the storyboard/xib to the ViewController/View then will it cause performance overhead? If so how?

Upvotes: 0

Views: 59

Answers (2)

Lee_KeinHong
Lee_KeinHong

Reputation: 357

See the IBOutlet Definition in Apple Developer.

Here's Outlets documentation link

We can see this

the more outlets an object has, the more memory it takes up. 
If there are other ways to obtain a reference to an object, 
such as finding it through its index position in a matrix, 
or through its inclusion as a function parameter, 
or through use of a tag (an assigned numeric identifier), 
you should do that instead.

So it will cause performance overhead.

For more details, you can see the documents.

Upvotes: 3

King.lbt
King.lbt

Reputation: 881

Yes. That's why you should create many storyboards base on your purposes. For example : Setting Storyboard, Main Storyboard, User Storyboard, Picker Storyboard.

Upvotes: 0

Related Questions