When a user clicks a button, I want a full screen iAd to appear, before the user can continue.
I can create the popup view, but how do I fill the whole view with an iAd? (e.g. like its done in wordfeud)
ADInterstitialAd (or full screen iAd) is only available for the iPad. You can't use it on the iPhone.
From iAd Programming Guide:
Full-Screen Advertisements are Only Available on iPad
Have a look at that guide to see how to implement full-screen iAds on the iPad.
Use the ADInterstitialAd class. You can present it from another view controller (e.g. your main game board’s) with -presentFromViewController:, or within an existing view with -presentInView:.
Related
I know this is an iPhone thing that the ViewController will take fullscreen when presented modally (in iPad it has transparent layer and not fullscreen). But is there a possible way to prevent the ViewController getting fullscreen on iPhone? I found some third party libraries that claim to do it but I'm hoping there's a way to do it without a third party library.
You might create a controller with a clear background then add a view on top that is sized however you like:
iOS: Modal ViewController with transparent background
I want to displaying my own ads in my applications. Acutally the ads banner are static images which are loaded after some delay. Is iad network should be enable for that the app which display these iads. Because i does not want to load iads from the apple.
No. iAd is only for displaying ads from the Apple iAd network using an ADBannerView in your app. If you are just presenting the user a banner image that you have created then no matter what it does you don't need to touch or worry about anything to do with iAd.
From Apple's Documentation:
The ADBannerView class provides a self-contained view. Your
application should not subclass ADBannerView, nor should your
application attempt to change the behavior of the banner view. For
example, your application should never add subviews to a banner view.
If you are using an ADBannerview for anything other than displaying iAds from Apple you're doing it wrong. It seems like you want to display your own ads which are static images. The correct class to use for this is UIImageView. If you display your own images using an ADBannerView you will get rejected from the App Store.
I've been watching some of the iPhone development videos off iTunes specifically "Standford Fall 2011 iPad and iPhone App Development" and in lecture 15 Modal View Controller/test/Animation is says that setModalPresentationStyle is only to be used with iPad. I was wanting to do this with an iPhone app, is this possible? has there been an update since this was made that allows it? or is there another way I can simulate the features in this? Like the form sheet presentation style.
Indeed, the modalPresentationStyle property of a view controller only applies to iPad. On iPhone and iPod touch, the presentation style is always fullscreen.
According to the documentation:
The presentation style determines how a modally presented view
controller is displayed on the screen. On iPhone and iPod touch
devices, modal view controllers are always presented full-screen, but
on iPad devices there are several different presentation options. For
a list of possible presentation styles, and their compatibility with
the available transition styles, see the “UIModalPresentationStyle”
constant descriptions.
To get the same effect as a form sheet presentation on the iphone, the easiest is to present a modal view controller setting it's modalTransitionStyle set to UIModalTransitionStyleCoverVertical (which is the default transition style).
On iPhone and iPod touch, modal view controllers are always presented full-screen, but on iPad there are several different presentation options.
https://developer.apple.com/library/ios/#DOCUMENTATION/UIKit/Reference/UIViewController_Class/Reference/Reference.html
You can try custom open source library for presenting form sheet on iPhone https://github.com/m1entus/MZFormSheetController
Could anyone provide some guidance on how to implement that speech-bubble like popup menu when you click "More" in the IPhone IPod application toolbar?
I think you are looking for UIPopoverController. Popover controllers are just containers for view controllers: write a view controller that does what you want, and you're set. But this is for iPad. If you want this for iPhone, then read on. I have put up some solutions.
You could even explore UIActionSheet but UIPopOverController gives more flexibility.
I believe you are talking about something like this ?
Here are some solutions you could adopt -
Forgot that you wanted this for iPhone, Have a look at the iPhone UIPopoverController implementation: WEPopover
On iPhone you would generally use a UIActionSheet for a stack of buttons like that. It slides up from the bottom, rather than popping up next to the button, but that's the standard behavior on iPhone.
Or you could manually instantiate a UIView using a custom background image or drawing with transparency, add some UIButtons (or other type of custom view) on top, and also somehow handle all touches outside that view.
Note that is is non-standard UI. An actionsheet would be more HIG compliant.
In my app I want to mimic the dock as displayed in Mac.Instead of using tab bar I want to use a dock kind of view in my app so that when a user taps on a dock item a new view is displayed.Is there any code or help availble for the same?
you could use photoshop to create the dock graphic, and individual buttons. upon one of the buttons being pressed have a new view transition in. Apple has sample code of how to transition views in their iPhone sample code.