Ambroise Collon
Ambroise Collon

Reputation: 3869

Manage iAd size when iPhone rotate

I've been googling and I cannot find anything on this.

I have an iAd banner working fine in portrait mode on iPhone. I want it to go to landscape mode. But I'd like to have the size it should have (the default exact size for landscape). I have set constraints so that it's sticked to bottom left and right. Height is also a constraints (set to 50, default portrait height) because I get errors and misplacement otherwise. The only thing I need is to have height 32 when iPhone rotate to landscape.

I've seen that all resizing method of ad banner are deprecated since iOS 6. Any idea how to do it then ?

Thanks !

Upvotes: 1

Views: 150

Answers (1)

Wain
Wain

Reputation: 119031

Detect the rotation of the interface and update the constant in the constraint (you can animate the constraint change if you want).

Upvotes: 1

Related Questions