AFAdSDKUdonNoodleControl Class Reference

Inherits from UIControl
Declared in AFAdSDKUdonNoodleControl.h

Overview

AFAdSDKUdonNoodleControl is an API compatible replacement of UIRefreshControl for iOS 5.0+ which uses the Appsfire Sashimi format to display advertisement in the refresh control view on top of a UIScrollView (can be a UITableView for instance).

  delegate

The object that acts as the delegate of the receiving Udon Noodle control.

@property (nonatomic, weak, readwrite) id<AFAdSDKUdonNoodleControlDelegate> delegate

Availability

2.3.0

Declared In

AFAdSDKUdonNoodleControl.h

  scrollView

The UIScroll view subclass used to trigger the Udon Noodle control.

@property (nonatomic, assign, readwrite) UIScrollView *scrollView

Availability

2.3.0

Declared In

AFAdSDKUdonNoodleControl.h

  color

The tint color for the refresh control.

@property (nonatomic, strong, readwrite) UIColor *color

Availability

2.3.0

Discussion

The default value of this property is nil.

Declared In

AFAdSDKUdonNoodleControl.h

  refreshingStrings

The array containing the strings used while the refresh control is in the AFAdSDKUNControlStateRefreshing state.

@property (nonatomic, strong, readwrite) NSArray *refreshingStrings

Availability

2.4.0

Discussion

Note: During the refresh, one of the strings will be picked up randomly.

Declared In

AFAdSDKUdonNoodleControl.h

  controlState

An Enum value reflecting the internal state of the Udon Noodle control.

@property (nonatomic, assign, readonly) AFAdSDKUNControlState controlState

Availability

2.3.0

Declared In

AFAdSDKUdonNoodleControl.h

  style

An Enum value to set the coloring style of the control.

@property (nonatomic, assign, readwrite) AFAdSDKUNControlStyle style

Availability

2.3.0

Declared In

AFAdSDKUdonNoodleControl.h

  scrollDismissStyle

An Enum value to set the scroll dismiss style of the control.

@property (nonatomic, assign, readwrite) AFAdSDKUNControlScrollDismissStyle scrollDismissStyle

Availability

2.4.0

Discussion

Note: This property controls the dismiss animation when an ad is visible and the user scrolls up to dismiss. Default is AFAdSDKUNControlScrollDismissStyleScale.

Declared In

AFAdSDKUdonNoodleControl.h

  defaultTopContentInset

Default top content inset.

@property (nonatomic, assign, readwrite) CGFloat defaultTopContentInset

Availability

2.3.0

Discussion

Note: If the you set a top contentInset of your UIScrollView you might want to set the same value to defaultTopContentInset.

Declared In

AFAdSDKUdonNoodleControl.h

  defaultTopContentOffset

Default top content offset.

@property (nonatomic, assign, readwrite) CGFloat defaultTopContentOffset

Availability

2.3.0

Discussion

Note: Useful on iOS 7.0+ when the UIScrollView is embedded in a view controller when the extended edges value edgesForExtendedLayout is equal to UIRectEdgeTop or UIRectEdgeAll. In this case the top contentOffset is equal to topLayoutGuide.length (64pt in portrait). The following code sample allows you to adjust the top content offset with rotation support:

 // In your view controller subclass.
 - (void)viewDidLayoutSubviews {
     [super viewDidLayoutSubviews];

     // Udon Noodle adjustment.
     if ([self respondsToSelector:@selector(topLayoutGuide)]) {
         CGFloat topOffset = self.topLayoutGuide.length;
         _udonNoodleControl.defaultTopContentOffset = topOffset;
     }
 }

Declared In

AFAdSDKUdonNoodleControl.h

  showAds

A Boolean value indicating whether the Udon Noodle control should show ads.

@property (nonatomic, assign, readwrite, getter=isShowingAds) BOOL showAds

Availability

2.3.0

Declared In

AFAdSDKUdonNoodleControl.h

– initWithScrollView:

Initializes and returns a standard Udon Noodle control.

- (id)initWithScrollView:(UIScrollView *)scrollView

Parameters

scrollView

The UIScrollView used to trigger the Udon Noodle control.

Availability

2.3.0

Declared In

AFAdSDKUdonNoodleControl.h

– beginRefreshing

Tells the control that a refresh operation was started programmatically.

- (void)beginRefreshing

Availability

2.3.0

Discussion

Note: Call this method when an external event source triggers a programmatic refresh of your table. For example, if you use an NSTimer object to refresh the contents of the table view periodically, you would call this method as part of your timer handler. This method updates the state of the Udon Noodle control to reflect the in-progress refresh operation. When the refresh operation ends, be sure to call the endRefreshing method to return the control to its default state.

Declared In

AFAdSDKUdonNoodleControl.h

– endRefreshing

Tells the control that a refresh operation has ended.

- (void)endRefreshing

Availability

2.3.0

Discussion

Note: Call this method at the end of any refresh operation (whether it was initiated programmatically or by the user) to return the Udon Noodle control to its default state. If the Udon Noodle control is at least partially visible, calling this method also hides it.

Declared In

AFAdSDKUdonNoodleControl.h

– dismissAd

Tells the control to programmatically dismiss when it’s showing an ad.

- (void)dismissAd

Availability

2.3.0

Discussion

Note: This method is only applied when the control’s state is AFAdSDKUNControlStateRefreshed.

Declared In

AFAdSDKUdonNoodleControl.h