Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Status bar and Banner on top #23

Open
foffux opened this issue Feb 13, 2015 · 5 comments
Open

Status bar and Banner on top #23

foffux opened this issue Feb 13, 2015 · 5 comments

Comments

@foffux
Copy link

foffux commented Feb 13, 2015

Hello.
Could you please check this line of code

if (!preiOS7 && !_showingiAd && !_showingAdMob && _adPosition==CJPAdPositionTop) {
        contentFrame.origin.y = statusBarHeight;
        contentFrame.size.height -= statusBarHeight;
}

I am using your controller with a simple UIViewController. I try to set

[CJPAdController sharedInstance].overrideIsNavController = YES;

but it was not good. See below:

@foffux
Copy link
Author

foffux commented Feb 13, 2015

sorry forgot some things....
schermata 2015-02-13 alle 18 01 08

So I try to:

[CJPAdController sharedInstance].overrideIsNavController = NO;

and what I got was better but not perfect: before displaying an Ads, again status bar did not take into account in right manner and what I got is the same as the previous image.

When I commented out:

/*if (!preiOS7 && !_showingiAd && !_showingAdMob && _adPosition==CJPAdPositionTop) {
        contentFrame.origin.y = statusBarHeight;
        contentFrame.size.height -= statusBarHeight;
    }*/

what I got, finally, was:

schermata 2015-02-13 alle 18 03 54

that is okay.
Any comment about it?

Thank you.

@foffux
Copy link
Author

foffux commented Feb 13, 2015

When I said:

"and what I got was better but not perfect: before displaying an Ads, again status bar did not take into account in right manner and what I got is the same as the previous image."

I had also add this:

but as soon as I got the Ads, then your controller resized the main view and what I took was a right display as the one shown in the second image. Obviously, when connection is off, then I keep with the wrong display and this is not good.
But if I commented out those lines I told you before...Are there correct? Maybe for tab bar and navigation bar? But What about simple view controller?

Thank you.

@chrisjp
Copy link
Owner

chrisjp commented Feb 14, 2015

I haven't tested this much in simple view controllers, only navigation or tab bar. But I don't get any problems using a standard UIViewController. I don't need to comment out those lines.

I think that what you tried first should be correct:

[CJPAdController sharedInstance].overrideIsNavController = YES;

Then I modified the demo project included in this repository to launch the UIViewController directly instead of using _navController:

ViewController *rootVC = [[ViewController alloc] init];
[CJPAdController sharedInstance] startWithViewController:rootVC];`

And what I get seems correct to me, both with and without ads...

ios simulator screen shot 14 feb 2015 13 18 04 ios simulator screen shot 14 feb 2015 13 17 52

@foffux
Copy link
Author

foffux commented Feb 16, 2015

Hello I do not actually know
My controller is a simple view controller with status bar and nothing more
but what I got is what I let you see
Any advice? If not, I guess I keep my workaround, at least locally.
Thank you

Il sabato 14 febbraio 2015, Chris Phillips [email protected] ha
scritto:

I haven't tested this much in simple view controllers, only navigation or
tab bar. But I don't get any problems using a standard UIViewController. I
don't need to comment out those lines.

I think that what you tried first should be correct:

[CJPAdController sharedInstance].overrideIsNavController = YES;

Then I modified the demo project included in this repository to launch the
UIViewController directly instead of using _navController:

ViewController *rootVC = [[ViewController alloc] init];
[CJPAdController sharedInstance] startWithViewController:rootVC];`

And what I get seems correct to me, both with and without ads...

[image: ios simulator screen shot 14 feb 2015 13 18 04]
https://cloud.githubusercontent.com/assets/448737/6199709/52677828-b44c-11e4-825b-e5220f6ca14a.png [image:
ios simulator screen shot 14 feb 2015 13 17 52]
https://cloud.githubusercontent.com/assets/448737/6199710/5753104a-b44c-11e4-9670-408efc2da004.png


Reply to this email directly or view it on GitHub
#23 (comment)
.

@foffux
Copy link
Author

foffux commented Mar 6, 2015

Hello Chris.
I have another question for you.
Am I allowed at runtime to to swap between iAd and AdMob just acting on:

[CJPAdController sharedInstance].adNetworks = @[@(CJPAdNetworkiAd), @(CJPAdNetworkAdMob)];

Is there some drawback by change this configuration is not in "didFinishLaunchingWithOptions"?

Thank you very much.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants