larsacus / LARSAdController

Lightweight ad mediation for iOS to properly manage multiple ad networks dynamically including iAd and Google ads.
http://theonlylars.com/blog/2013/01/10/stupid-easy-ads-with-larsadcontroller-3-dot-0/
MIT License
269 stars 60 forks source link

google ads set to appear at top, which are not full-screen width, are placed in top left, not top center. #108

Open georgejecook opened 9 years ago

georgejecook commented 9 years ago

How to correct this?

just had a look through the code and it seems extraordinarily difficult to resolve without hacking the source, i.e. using delegates, etc.

I'd prefer not to have to go hacking your source as I install your lib with cocoapods.

larsacus commented 9 years ago

Can you provide some more information such as OS, platform, logging, etc?

georgejecook commented 9 years ago

iOS 8.

are there any hooks for resizing the ad views?

larsacus commented 9 years ago

You don't have any control as to the specific size of the ads. The ad network returns an ad at a particular size. I can only specify what type of ads to receive based on platform, etc.

georgejecook commented 9 years ago

I mean the view it sits in.. any way for me to better control the position (i.e. center it horizontally?).. or at least know when it's been updated so I can place it into a correctly sized black view, and center it in that.

larsacus commented 9 years ago

It should automatically center itself horizontally internally -- if not, that should be a bug. You have access to the container view on LARSAdController to manipulate any way you please:

/** The container view that the ads are contained in. Exposed so you can do anything you would want with it.
 */
@property (nonatomic, readonly, strong) LARSAdContainer *containerView;
georgejecook commented 9 years ago

But is there notification to say when it's added an ad? coz if not, I'd have no way of knowing it's done something silly with the sizing.

larsacus commented 9 years ago

What do you mean "added an ad"? You shouldn't have to listen for individual ads coming and going from the view as that's the entire point of this control and to abstract that information away from you.

georgejecook commented 9 years ago

Ok, so is the bug fixed then? "It should automatically center itself horizontally internally -- if not, that should be a bug. You have access to the container view on LARSAdController to manipulate any way you please:"

It doesn't center horizontally if the ad is smaller than the screen width.

larsacus commented 9 years ago

Please attach some logs, screenshots, or any other information that could be used to determine if this actually is a "bug" or not before I can claim that it is fixed. Yes, it should currently center itself horizontally, as that is how I am currently seeing it on my device right now.