I have both iAd and AdMob in my application. Can I customize the ad sizes in my application to 320x250? Or are only predefined sizes mentioned in the documentation possible, for example 320x50?
I think it is not possible, but I just want to confirm this.
Yes , Its possible to make custom size with AdMob using DFPBannerView. Please try with below code -
// Define custom GADAdSize 320 x 220
GADAdSize customAdSize = GADAdSizeFromCGSize(320, 220);
self.adBanner = [[DFPBannerView alloc] initWithAdSize:customAdSize];
Please check below url for more details -
https://developers.google.com/mobile-ads-sdk/docs/dfp/ios/banner
Related
I implemented Ionic Native's Admob Free.
https://ionicframework.com/docs/native/admob-free/
Then, ads are always fixed at the bottom.
Is it impossible to display this in any position?
Can I do with Admob Pro?
If you know something, please let me know.
As you can see in the AdMob Free plugin documentation, you can place the ad at top or bottom.
To place it on top you have to set bannerAtTop as true in the config.
const bannerConfig: AdMobFreeBannerConfig = {
...
bannerAtTop: true,
};
this.admobFree.banner.config(bannerConfig);
But, in the AdMob Pro, you can set the x,y coordinates position in pixels using showBannerAtXY() method. Here is the documentation.
I haven't worked with iAd ads and this is the first time i am going to implement them. Went though googling a lot of tutorials but they most of them are so old and done programmatically. What i want is to learn how to add them in the StoryBoard.
I can see the ad banner view in my StoryBoard. Although when i add the "Ad BannerView" by dragging it in my view controller and run it, it just crash saying uncaught exception. What else i need to do other than just dragging it in the StoryBoard, in order for it to work?
I think the best way to achieve this is to take a look at apple sample code. The iAd suite has many different approaches and one of the is integrating the iAd with story board. Here is the link to the sample code: https://developer.apple.com/LIBRARY/IOS/samplecode/iAdSuite/Introduction/Intro.html
Also here is the link to the iAd class reference for further study. https://developer.apple.com/library/ios/documentation/userexperience/Reference/iAd_ReferenceCollection/_index.html
I hope that clears the way for you to solve this issue.
You can just put this into -viewDidLoad:
ADBannerView *adView = [[ADBannerView alloc] initWithFrame:CGRectZero];
adView.currentContentSizeIdentifier = ADBannerContentSizeIdentifierPortrait;
[self.view addSubview:adView];
Don't forget to import the iAd Framework. If I was you I should use Google's AdMob.
This is a good link.
I'm currently working with the AVCam demo app to present a live camera feed over airplay or apple hdmi adapter for import into a HD camera switcher.
The issue I'm having is with OverScanCompensation to remove the huge black border from the mirrored view.
The only documentation I have found is to implement the screen.overscanCompensation = 3; method someplace? I have tried to put it into viewDidLoad and it will let me, but it doesn't change anything on the external view?
I had success of sorts with the Airplay Demo (quellish) using UIImagePicker, but I would much prefer to implement AVFoundation for this exercise.
Is there a better way to achieve what I'm looking for without having to implement separate view controllers?
All you need to do is, upon setting up the external screen (via, say, if ([[UIScreen screens] count] > 1) externalScreen = (UIScreen *)[[UIScreen screens] objectAtIndex:1];), set the overscanCompensation property of the above UIScreen instance to UIScreenOverscanCompensationInsetApplicationFrame (=2). It'll entirely get rid of both the border (overscanning) and image quality-deterioating scaling.
See http://www.iphonelife.com/blog/87/tv-display-output-why-does-your-picture-have-black-border-and-how-can-it-be-fixed for more info.
Any possibility of displaying an iAd banner in a UIModalPresentationFormSheet?
Reading the documentation there are is no size listed for iPad form sheet:
https://developer.apple.com/library/ios/#documentation/UserExperience/Conceptual/iAd_Guide/BannerAdvertisements/BannerAdvertisements.html
It also says "In the future, additional sizes may be exposed by iAd."
In the meantime, any recommendations on how to handle this? The form view on iPad will display for a long period of time and is where the ad banner should be.
Searching a bit, I see there's some code to display ads from other network types, in this case "ad mob", in a form view:
https://github.com/navisingh/ad-networks/tree/master/GoogleAdMobAdsSDK
If iAd does not support form sheet, then I guess I could search other networks.
UPDATE: Ad Mob supports sizing as follows...
// Size ad banner to form view width
CGFloat aWidth = [self view].frame.size.width;
adMobBannerView_ = [[GADBannerView alloc] initWithAdSize:GADAdSizeFromCGSize(CGSizeMake(aWidth, 60.0f))];
Hi friends now i am developing Ads for Ipad,I am Using Admob.i have a small problem.
in admob documentation itself adsize in portrait view is 728x90.i want to change adsize to 768x90 to fit exactly in screen.i have changed frame by calling setFrtame for AdBannerView but it cant changes the size
*is it possible to change add size...? and at the same time i nee to show add in landscape with size 1024x90 *
Here is My Code
[AdmobBanner setFrame:CGRectMake(0,0,768,90)]; //Portrait
[AdmobBanner setFrame:CGRectMake(0,0,1024,90)]; //Landscape
Can any one help me to find the solution For this
AdMob currently supports only few ad dimensions. There is no way how to set your own size. Best thing to do would be to insert your ad into some kind of visual container with proper dimensions and fill rest of the screen with appropriate graphics