Customizing the Logon UI

To be able to use the customization options MAF Logon UI provides, implement MAFLogonUICustomizationDelegate in one of your classes.

Use this code to implement it:
#import <UIKit/UIKit.h>
#import "MAFLogonNGDelegate.h"
#import "MAFLogonUICustomizationDelegate.h"

@interface MAFLogonNGSampleViewController : UIViewController <MAFLogonNGDelegate, MAFLogonUICustomizationDelegate>

@end
You can decide whether to provide your own UIView subclass for the header and the footer views. This is the most flexible way of customizing the screens. The UIView subclass can contain any layout and elements you wish. To provide a custom UIView, use a code similar to this:
- (void) willRenderHeaderFooterFromCustomContext:(MAFLogonUICustomizationContext*)aCustomContext{
    
       	// the current screen can be determined using aCustomContext.screenType property
    
    if (([[UIDevice currentDevice] userInterfaceIdiom] == UIUserInterfaceIdiomPhone)) {
        if (UIDeviceOrientationIsLandscape([[UIApplication sharedApplication] statusBarOrientation])){
            aCustomContext.headerView = [[[UIImageView alloc] initWithImage:[UIImage imageNamed:@"iPhone_landscape_header"]] autorelease] ;
            aCustomContext.footerView = [[[UIImageView alloc] initWithImage:[UIImage imageNamed:@"iPhone_landscape_footer"]] autorelease];
        }
        else{
            
            aCustomContext.headerView = [[[UIImageView alloc] initWithImage:[UIImage imageNamed:@"iPhone_portrait_header"]] autorelease] ;
            aCustomContext.footerView = [[[UIImageView alloc] initWithImage:[UIImage imageNamed:@"iPhone_portrait_footer"]] autorelease];
        }
    }
    else{
        
        if (UIDeviceOrientationIsLandscape([[UIApplication sharedApplication] statusBarOrientation])){
            
            aCustomContext.headerView = [[[UIImageView alloc] initWithImage:[UIImage imageNamed:@"iPad_landscape_header"]] autorelease] ;
            aCustomContext.footerView = [[[UIImageView alloc] initWithImage:[UIImage imageNamed:@"iPad_landscape_footer"]] autorelease];
        }
        else{
            
            aCustomContext.headerView = [[[UIImageView alloc] initWithImage:[UIImage imageNamed:@"iPad_portrait_header"]] autorelease] ;
            aCustomContext.footerView = [[[UIImageView alloc] initWithImage:[UIImage imageNamed:@"iPad_portrait_footer"]] autorelease];
        }
        
    }
}
MAF provides a more basic customization option with the willRenderUIFromContext delegate. Use this delegate to provide localized titles and descriptions for any of the logon UI screens:
-(void)willRenderUIFromUIContext:(MAFLogonUIContext *)aUIContext{
aUIContext.title=[NSString stringWithFormat:@"Custom Title"];
aUIContext.headerTitle=[NSString stringWithFormat:@"Custom Header Title"];
aUIContext.headerDescription=[NSString stringWithFormat:@"Custom Header Description"];
aUIContext.footerDescription=[NSString stringWithFormat:@"Custom Footer Description"]; 
}
You can also check which screen is presented, and perform the customization per screen.