I have added canDisplayBannerAds
into my application and it's working great with one minor exception, it causes my container view to get clipped for some reason.
In the image below it shows a UITextView
above a Container View.
Notice on the right side that the container view isn't fully rounded and is not appearing to be left-aligned with the text view.
The left hand side shows how it looks with canDisplayBannerAds = NO
.
The right hand side shows how it looks with canDisplayBannerAds = YES
.
I've tried reproducing this in a simple project, but wasn't able to yet. I have tried a suggestion I found elsewhere on SO to add [self.originalContentView layoutSubviews];
to viewDidLayoutSubviews
but it didn't resolve the issue.
Before displaying the container view I am doing:
self.containerView.layer.cornerRadius = 10;
self.containerView.layer.masksToBounds = YES;
I removed the masksToBounds
to see how it would look, and the left hand side still doesn't line up with the text view above it.
While I'm giving the textview left-align container view screenshot, when in landscape the container view is left-aligned to a label. This also works fine when not displaying ads. In addition, I am not referencing self.view
anywhere in the code.
Is this just a bug with canDisplayBannerAds
that I'm going to have to live with or is there something I can do about it?