Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

sizeFromBannerContentSizeIdentifier deprecated in iOS 6, alternatives?

Tags:

ios

Does anyone know the new method to use instead of sizeFromBannerContentSizeIdentifier, which is deprecated in iOS 6?

like image 871
Martol1ni Avatar asked Nov 04 '22 14:11

Martol1ni


2 Answers

There is not other method. You can use the frame property, it gives you the ad view size as well.

CGSize adSize = adView.frame.size;
like image 76
Firula Avatar answered Nov 15 '22 05:11

Firula


You can use the bounds property -

CGSize myBannerSize = myBanner.bounds.size;

Apple didn't replace sizeFromBannerContextSizeIdentifier - you'll need to use the bounds.

like image 34
Undo Avatar answered Nov 15 '22 05:11

Undo