Class: ADInterstitialAd

NSObject show all


The ADInterstitialAd class provides full-screen advertisements that your iPad application can display to the user. When the user taps a full-screen advertisement, the advertisement launches a full-screen ad with rich media and interactive capabilities. Your application is notified when the advertisement is launched, but does not otherwise interact with the ad. You receive revenue when users view the advertisements or interact with the advertisements displayed by your application.

Instance Attribute Summary (collapse)

Instance Method Summary (collapse)

Methods inherited from NSObject

#!, #!=, #!~, #, #==, #===, #=~, #Rational, #__callee__, #__method__, #__send__, #__type__, `, alloc, allocWithZone:, #autoContentAccessingProxy, autoload, autoload?, autorelease_pool, #awakeAfterUsingCoder:, binding, block_given?, caller, cancelPreviousPerformRequestsWithTarget:, cancelPreviousPerformRequestsWithTarget:selector:object:, catch, class, classFallbacksForKeyedArchiver, #classForCoder, #classForKeyedArchiver, classForKeyedUnarchiver, #clone, conformsToProtocol:, #copy, copyWithZone:, #dealloc, #define_singleton_method, description, display, #doesNotRecognizeSelector:, #dup, #enum_for, #eql?, #equal?, #extend, fail, #finalize, format, #forwardInvocation:, #forwardingTargetForSelector:, framework, #freeze, #frozen?, getpass, gets, global_variables, #init, initialize, #initialize_clone, #initialize_copy, #initialize_dup, #inspect, instanceMethodForSelector:, instanceMethodSignatureForSelector:, #instance_eval, #instance_exec, #instance_of?, #instance_variable_defined?, #instance_variable_get, #instance_variable_set, #instance_variables, instancesRespondToSelector:, isSubclassOfClass:, #is_a?, iterator?, #kind_of?, lambda, load, load_bridge_support_file, load_plist, local_variables, loop, #method, #methodForSelector:, #methodSignatureForSelector:, #methods, #mutableCopy, mutableCopyWithZone:, new, #nil?, open, p, #performSelector:onThread:withObject:waitUntilDone:, #performSelector:onThread:withObject:waitUntilDone:modes:, #performSelector:withObject:afterDelay:, #performSelector:withObject:afterDelay:inModes:, #performSelectorInBackground:withObject:, #performSelectorOnMainThread:withObject:waitUntilDone:, #performSelectorOnMainThread:withObject:waitUntilDone:modes:, print, printf, #private_methods, proc, #protected_methods, #public_method, #public_methods, #public_send, putc, puts, raise, rand, readline, readlines, #replacementObjectForCoder:, #replacementObjectForKeyedArchiver:, require, resolveClassMethod:, resolveInstanceMethod:, #respond_to?, #respond_to_missing?, select, #send, setVersion:, #singleton_methods, sprintf, srand, superclass, #taint, #tainted?, #tap, test, throw, #to_plist, #to_s, trace_var, trap, #trust, #untaint, untrace_var, #untrust, #untrusted?, version

Constructor Details

This class inherits a constructor from NSObject

Dynamic Method Handling

This class handles dynamic methods through the method_missing method in the class NSObject

Instance Attribute Details

- (Boolean) actionInProgress (readonly)

A Boolean value that states whether the ad is currently executing an action. (read-only) When the user taps on the ad, the advertisement triggers an action, displaying a media rich, interactive advertisement to the user. The value of this property is YES when an advertisement controls the screen, otherwise the value of this property is NO.Your application should avoid polling this property to determine when an action starts or stops. Instead, implement the delegate methods to detect when actions begin or end.


  • (Boolean)

- (Object) delegate

The delegate of the interstitial ad object. Your application sets a delegate to be notified when the state of the ad object changes.


- (Boolean) loaded (readonly)

A Boolean value that states whether the interstitial ad object has downloaded an advertisement. (read-only) After your application creates an ad object, it automatically downloads content from the iAd Network. The value of this property is YES if the ad object has finished loading advertising content, otherwise the value of this property is NO. Do not poll the value of this property to determine whether an advertisement has been loaded; instead, implement the delegate’s interstitialAdDidLoad: method.


  • (Boolean)

Instance Method Details

- (Object) cancelAction

Cancels an executing advertisement. An advertisement that is executing on top of your application completely covers your application’s user interface, but your application continues to run. If your application receives an event that requires the user’s attention, it can programmatically cancel the advertisement so that its normal interface is restored. The ad’s delegate is not called when your application cancels the action; your application is expected to restart any services it paused before the action began executing.Canceling actions removes the advertisement from being displayed; frequently canceling advertisements can affect the revenue you earn from using advertisements in your application.


- (Object) presentFromViewController(viewController)

Presents a full screen advertisement modally to the user. Your application presents a full-screen advertisement modally when it requires the user to interact with the advertisement before continuing to the next screen of content in your application. For example, a game might present a modal advertisement after the player finishes playing a match; the player must dismiss the advertisement before beginning another match. When the modal advertisement is dismissed by the user, the advertisement is removed from the screen and its contents are unloaded from memory.An ad object throws an exception if your application presents the ad before it finishes loading content from the iAd Network.



- (Boolean) presentInView(containerView)

Displays the advertisement within an application view. Your application presents a full-screen advertisement in a view when it wants the advertisement to be displayed seamlessly alongside other content, such as in a magazine layout. Typically the view is added as a subview of a scroll view configured to display its contents on page boundaries. An advertisement presented by a view expires after a period of 5 to 15 minutes. If the advertisement was offscreen when it expired, it is immediately unloaded from memory; otherwise, the advertisement is unloaded as soon as it moves offscreen.An ad object throws an exception if your application presents the ad before it finishes loading content from the iAd Network.The view passed into this method must be part of a view hierarchy managed by a view controller and must be large enough to accomodate the advertisement’s contents. The width of the view must be exactly the width of the screen. The height of the view may be up to 113 pixels shorter than the height of the screen. If your view’s size does not meet these requirements, the method returns NO to your application, and the advertisement is not added to the view. See iOS Human Interface Guidelines for more information.While your view is displaying an advertisement, the advertisement completely covers any other content in the view. When the ad’s contents are unloaded, the advertisement is automatically removed from your view.Important: Although the ad object adds a subview to your view, your application should never rely on this behavior, nor should it ever attempt to modify that view.


  • containerView (UIView)

    A screen sized view provided by your application to hold the ad.


  • (Boolean)

    YES if the ad was added successfully, otherwise NO.