Book Image

iAd Production Beginner's Guide

By : Ben Collier
Book Image

iAd Production Beginner's Guide

By: Ben Collier

Overview of this book

Think of an iAd as a micro-app contained within an app on a user's iPhone or iPad that they've downloaded from the App Store. When the user taps your advert's banner it bursts into life filling the entire screen of their device. iAd Beginner's Guide takes you through the start to finish process of building rich, compelling, interactive iAds. You will learn to create beautiful multi-page ads with store finders, social sharing, 3D images and video galleries. You will create ads that utilize the powerful technologies in the iPhone to make your brand shine. Once you have engaged the user you can carry out targeted advertising campaigns with location-based coupons, store finders and social engagement. Using the iTunes Store you will see how it's even possible to add one-click digital content purchasing right within your ad. Learn how iAd producer manages all the HTML5, JavaScript, and CSS3 behind your iAd. You will be creating emotive, gripping and effective mobile advertising campaigns in no time.
Table of Contents (18 chapters)
iAd Production
Credits
About the Author
About the Reviewer
www.PacktPub.com
Preface

Time for action — you spin me right round


If you're using the demo app, then let's enable all the possible orientations. Make sure our banner adjusts itself accordingly:

  1. 1. Open the demo app in Xcode. If you're using your own app that already supports multiple orientations, skip ahead to step 4.

  2. 2. To enable our app to know it should spin the view when the device is rotated, we need to modify a simple bit of Objective C. Open the file iAd_Demo_AppViewController.m from the project navigator; you'll see the code appear on screen. Find the method (BOOL)shouldAutorotateToInterfaceOrientation, which should be near the end of the function. This is called by the device when it's rotated and we're able to tell it when it should and shouldn't update the view. Find the following line:

    return (interfaceOrientation == UIInterfaceOrientationPortrait);
    
  3. 3. At the moment, it checks if the rotation orientation is portrait, and returns YES if it is and NO if it isn't. We're able to override this check and always...