Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training,
learning paths, books, tutorials, and more.

Time for action — adding another ad

As the iAd framework notifies us when no adverts are available, we can use this delegate method to display an alternative banner, namely, a simple image.

We'll continue with our demo iAd app that we created in the last chapter; open it in Xcode now. For our banner, we'll use an image that is the same size as an iAd banner, 320px wide and 50px high, but we'll also require a high-resolution, double-sized image for retina displays. In the iAd Demo App folder included with the book resources, locate the images Banner@2x.png and Banner.png to the project navigator, that is, to the left of Xcode.