Presentation

Himono wraps our in-stream sashimi format inside a small banner (50pt for iPhone, 90pt for iPad). It contains a system to automatically refresh ads. However you don't have the flexibility of a custom sashimi, and thus you can't customize the view in depth (aside the colors).

himono-banner-ex1 himono-banner-ex2

Integrating Himono

Adding Himono to your application is really simple!

Import

The first thing you need to do is to import the required class:

// Required for himono
#import "AFAdSDKHimonoBannerView.h"

Create an instance of Himono

Then you have to create an instance of Himono where you want to display it:

AFAdSDKHimonoBannerView *himonoBannerView;

// Create himno 
himonoBannerView = [[AFAdSDKHimonoBannerView alloc] initWithAdSize:CGSizeMake(CGRectGetWidth(self.view.bounds), kAFAdSDKBannerHeight50)];

// Set delegate
himonoBannerView.delegate = self;

// Load the first ad
[himonoBannerView loadAd:@"ZONE_ID"];

ZONE_ID is the zone ID for your Himono (banner) ads as provided by Appsfire.

Monitor the loading of ads

An ad may not be available at the instanciation of the Himono view. That's why you should implement the delegate (that we set in the snippet above). Once you get the event from the delegate, display the view in your application.

This function is called each time a new ad is displayed inside the Himono view.
- (void)himonoBannerViewDidLoadAd:(AFAdSDKHimonoBannerView *)himonoBannerView {

    // Add you `himonoBannerView` object to the proper superview

}

More delegate methods are available! Please check the header file or the "api reference" documentation for more information!

Customization

You can customize all of the colors of the Himono view.
You have to create a AFAdSDKHimonoProperties object that you'll pass to the initialization of the AFAdSDKHimonoBannerView.

AFAdSDKHimonoProperties *himonoProperties;
AFAdSDKHimonoBannerView *himonoBannerView;

// Create properties
himonoProperties = [AFAdSDKHimonoBannerView alloc] init];

// Update the properties you want!

// Create himno 
himonoBannerView = [[AFAdSDKHimonoBannerView alloc] initWithAdSize:CGSizeMake(CGRectGetWidth(self.view.bounds), kAFAdSDKBannerHeight50) properties:himonoProperties];

// [...]
For a complete example of integration refer to the demo project dedicated to the Himono format. You can find it in the Xcode package of our SDK in examples/ folder.