I have added an iAd banner view to my project and pinned it to the top of the main view controller in a storyboard. Initially when the app loads the iAd banner is displayed at the bottom of the screen. The banner is then hidden during a game and then unhidden at the end of the game. When the banner is unhidden it appears correctly as designed in the storyboard at the top of the view. Any thoughts why this is happening? This occurs on both the simulator and real devices.
You've created two ADBannerView's in your application. Once with self.canDisplayBannerAds = true and once programmatically.
self.canDisplayBannerAds = true can be used for a no hassle way of implementing iAds in your application. This will create an ADBannerView for you and show or hide the ADBannerView depending on whether it receives an ad or not from the iAd network. The ADBannerView you're seeing at the bottom of your screen is created by self.canDisplayBannerAds = true. The ADBannerView you're seeing at the top of your screen is the ADBannerView you have created.
Remove self.canDisplayBannerAds = true from your viewDidLoad function.
Related
In my Xamarin.Forms app, I have a MasterDetailPage with MasterBehavior set to Split when the device Idiom is Tablet. That is, I always want master page to be displayed.
The exception is during multitasking. For example, on iOS, if the user enters Split View, then I want the app to behave like it's on a phone, with no split view, but instead just a master or detail page displayed, and the proper navigation controls to move between them.
It seems like MasterDetailPage wants to help me with this. When I drag up another app to enter Split View on iOS, my app no longer shows the master page. However, the detail page that remains has no navigation control to return to the master.
What is the proper way to detect the mode change and dynamically adjust the navigation in Xamarin.Forms when your app enters and leaves Split View on iOS or split-screen mode on Android?
I have an iOS application, with iAd using ADBannerView. It works perfectly in iOS 5, showing the ad full screen when the user taps on the banner. But when I run the exact same code in iOS 6, the navigation bar and tab bar shows on top of the ad:
Note that the "X" button on the Ad behind the nav bar works as it should to close the Ad, and the navigation bar and tab bar buttons work as well.
My app has a UITabBarController as the root controller, with 4 UINavigationControllers under it. And I did call this in didFinishLaunchingWithOptions:
[self.window setRootViewController:tabBarController];
What could be wrong? I'm guessing the view hierarchy is somehow not setup correctly.
Thanks in advance for your help!
I think I found the issue. This is most likely because my UIViewController hierarchy was not properly setup, in that I didn't have a addChildViewController: call where it's needed. The When to use addChildViewController vs pushViewController thread was very helpful.
An alternative that I'd recommend now is to simply use the code in the TabbedBanner project in the Apple iAdSuite sample.
I am working on a magazine type application for galaxy tab 10.1. I have created each page using Fragment.User can swipe his finger horizontally to move to next page which is a different fragment. Most of the pages are "full page image".I am using this library for zooming/pinch zoom static pages/images.
Problem I am facing -
(1) If i zoom-in a page and than scroll to left or right end of page and than move to next fragment/page.After that when i go back to previous fragment/page,the page is still in zoomed state. What i am trying to do is reset the page in normal state when i move to next page/fragment.
Thanks
When in landscape mode, the UISplitViewController displays the detail and master views.
The detail view has an AdBanner in it. However, when we set the AdBanner's CurrentContentSizeIdentifier to SizeIdentifierLandscape the banner is too wide for the detail view.
How can we put AdBanners in the Detail view of a UISplitViewController?
If a banner with ADBannerContentSizeIdentifierPortrait fits, you could use that.
Or you could put the ad banner view on top of the UISplitViewController's view in the UIWindow and construct your sub-controllers in such a way that it looks right with the ad banner overlapped, although that may give you other problems when it comes to orientation updates.
Or you could try adding the ad banner as a subview of the UISplitViewController's view, and possibly also adjust the positions of its other subviews to try to get things to not overlap, but this may or may not be allowed if you want your app approved for the app store.
Otherwise you're just out of luck.
I have an app with UINavigationController. There is ADBannerView on the root view of the navigation controller.
Should I somehow stop recieving ads when I go to another views (and rootView disappears from screen)?
I haven't found some special discussion of this topic on Internet. There is no info about it in iAd Programming Guide. And, according to my own tests (simple breakpoints to delegate methods) - ADBannerView recieves Ads (or process them with delegate methods) only when parent view controller is active.
That's why I suppose the answer to my question is "nothing". I should only correctly place ADBannerView and implement delegate methods.
There is always the 30 seconds rule, where ad display only count when you show a Ad for more then 30 seconds. This would mean if your user navigate to another view the ad that was displayed on your root doesn't count.
I'm currently trying to figure out how you can display the iAd banner outside the UINavigationController so that the iAd banner remains in view and the change that you hit that 30 seconds increases.