D. Styling Offerwall

Offerwall itself is good to use in default style, but you may want to change the style of offer wall to match your app's UI.



1) Style of Ad List

- (void) setTableViewStyle:(UITableViewStyle)style; // UITableViewStylePlain(기본값) 또는 UITableViewStyleGrouped로 설정
- (void) setHeaderColor:(UIColor *)color; // background color of header area(navigation bar)
- (void) setListItemBackgroundColorNormal:(UIColor *)color; //background color of list item (Normal state)
- (void) setListItemBackgroundColorStripe:(UIColor *)color; // background color of odd-numbered list item (Normal state)
- (void) setListItemBackgroundColorHighlight:(UIColor *)color; // background color of list item (Highlight state)

- (void) setFreeBoxButtonImage:(UIImage *)image; // Tag image for free item
- (void) setPaidBoxButtonImage:(UIImage *)image; // Tag image for paid item
- (void) setConfirmBoxButtonImage:(UIImage *)image; // Tag image for joined item

2) Style of Ad Detail

- (void) setDetailBackgroundColor:(UIColor *)color; // Background color of detail view
- (void) setDetailHeaderBackgroundColor:(UIColor *)color; // background color of header area
- (void) setDetailButtonImageNormal:(UIImage *)image; // button image (Normal state)
- (void) setDetailButtonImageHighlight:(UIImage *)image; // button image (Highlight state)
- (void) setDetailButtonTextColor:(UIColor *)color; // Text color

3) Sample code

Sample Code

    // set styles

    [[TnkSession sharedInstance] setHeaderColor:TITLE_BAR_COLOR];

    [[TnkSession sharedInstance] setHeaderTitle:LocalString(@"adlist")];

    [[TnkSession sharedInstance] setDetailBackgroundColor:[UIColor colorWithPatternImage:[UIImage imageNamed:@"bg_detail.png"]]];

    [[TnkSession sharedInstance] setListItemBackgroundColorNormal:[UIColor colorWithPatternImage:[UIImage imageNamed:@"adlist_bg_normal.png"]]];

    [[TnkSession sharedInstance] setListItemBackgroundColorStripe:[UIColor colorWithPatternImage:[UIImage imageNamed:@"adlist_bg_stripe.png"]]];

    [[TnkSession sharedInstance] setListItemBackgroundColorHighlight:[UIColor colorWithPatternImage:[UIImage imageNamed:@"adlist_bg_highlight.png"]]];

    [[TnkSession sharedInstance] setDetailHeaderBackgroundColor:[UIColor colorWithPatternImage:[UIImage imageNamed:@"detail_header_bg.png"]]];

    

    [[TnkSession sharedInstance] setFreeBoxButtonImage:[UIImage imageNamed:@"az_list_bt_free.png"]];

    [[TnkSession sharedInstance] setPaidBoxButtonImage:[UIImage imageNamed:@"az_list_bt_pay.png"]];

    [[TnkSession sharedInstance] setConfirmBoxButtonImage:[UIImage imageNamed:@"az_list_bt_install.png"]];

    

    UIImage *detailButtonNormal = [UIImage imageNamed:@"detail_bt_bg.png"];

    UIImage *stretchableDetailButtonNormal = [detailButtonNormal stretchableImageWithLeftCapWidth:10 topCapHeight:0];

    [[TnkSession sharedInstance] setDetailButtonImageNormal:stretchableDetailButtonNormal];



Comments