IGOverlayView Class Reference

Inherits from UIView
Declared in IGOverlayView.h

Overview

The IGOverlayView is a powerful and extremely flexible control for displaying any type of view that will overlay another view, with or without animation, when shown or dismissed. A total of 12 overlay animations are included, with 2 of these animation types allowing for custom animations limited by your imagination.

Adding views to overlay another view is a cinch, but if you require more than a quick and simple solution, the IGOverlayView was also designed to be extended upon. By deriving from the IGOverlayView class, you can tap into your creative psyche while using the IGOverlayView to help push your app to the next level.

Initialization and Configuration

  delegate

The object that acts as the delegate of the IGOverlayView.

@property (nonatomic, assign, nullable) id<IGOverlayViewDelegate> delegate

Discussion

The class must adopt the IGOverlayDelegate protocol.

Declared In

IGOverlayView.h

  durationShow

The amount of time in seconds that it will take for the IGOverlayView to animate into the enter frame position.

@property (nonatomic, assign) NSTimeInterval durationShow

Discussion

The default value is set for 1.0 second.

Declared In

IGOverlayView.h

  durationDismiss

The amount of time in seconds that it will take for the IGOverlayView to animate into the exit frame position.

@property (nonatomic, assign) NSTimeInterval durationDismiss

Discussion

The default value is set for 1.0 second.

Declared In

IGOverlayView.h

Overlay Visibility

– showInView:withAnimation:

Show the IGOverlayView in the specified view.

- (void)showInView:(UIView *)view withAnimation:(IGOverlayAnimationType)animationType

Parameters

view

The UIView in which the IGOverlayView will be shown.

animationType

The type of animation to use when the IGOverlayView is shown.

Discussion

Supported animation type key enumeration values:

  • IGOverlayAnimationNone - the IGOverlayView will appear with no animation.
  • IGOverlayAnimationSlideTop - the IGOverlayView will slide down from the top of the specified view.
  • IGOverlayAnimationSlideTopFade - the IGOverlayView will fade in and slide down from the top of the specified view.
  • IGOverlayAnimationSlideLeft - the IGOverlayView will slide into the specified view from the left.
  • IGOverlayAnimationSlideLeftFade - the IGOverlayView will fade in and slide from the left of the specified view.
  • IGOverlayAnimationSlideRight - the IGOverlayView will slide into the specified view from the right.
  • IGOverlayAnimationSlideRightFade - the IGOverlayView will fade in and slide from the right of the specified view.
  • IGOverlayAnimationSlideBottom - the IGOverlayView will slide up from bottom of the specified view.
  • IGOverlayAnimationSlideBottomFade - the IGOverlayView will fade in and slide up from the bottom of the specified view.
  • IGOverlayAnimationFade - the IGOverlayView will fade into the specified view.
  • IGOverlayAnimationCustomFade - the IGOverlayView will fade into from the specified enter frame returned from the customEnterFrameForOverlay: IGOverlayDelegate method into the specified view. This animation type will also attempt to call the customEnterAnimationForOverlay: IGOverlayDelegate method for any custom UIView property animations.
  • IGOverlayAnimationCustomSlide - the IGOverlayView will slide from the specified enter frame returned from the customExitFrameForOverlay: IGOverlayDelegate method into the specified view. This animation type will also attempt to call the customEnterAnimationForOverlay: IGOverlayDelegate method for any custom UIView property animations.

Declared In

IGOverlayView.h

– dismiss:

Dismiss the IGOverlayView from its superview.

- (void)dismiss:(IGOverlayAnimationType)animationType

Parameters

animationType

The type of animation to use when the IGOverlayView is dismissed.

Discussion

Supported animation type key enumeration values:

  • IGOverlayAnimationNone - the IGOverlayView will be dismissed with no animation.
  • IGOverlayAnimationSlideTop - the IGOverlayView will slide up and out of the specified view.
  • IGOverlayAnimationSlideTopFade - the IGOverlayView will fade out and slide up and out of the specified view.
  • IGOverlayAnimationSlideLeft - the IGOverlayView will slide out of the specified view to the left.
  • IGOverlayAnimationSlideLeftFade - the IGOverlayView will fade out and slide left and out of the specified view.
  • IGOverlayAnimationSlideRight - the IGOverlayView will slide out of the specified view to the right.
  • IGOverlayAnimationSlideRightFade - the IGOverlayView will fade out and slide right and out of the specified view.
  • IGOverlayAnimationSlideBottom - the IGOverlayView will slide down and out of the specified view.
  • IGOverlayAnimationSlideBottomFade - the IGOverlayView will fade out and slide down out and out of the specified view.
  • IGOverlayAnimationFade - the IGOverlayView will fade out of the specified view.
  • IGOverlayAnimationCustomFade - the IGOverlayView will fade out of the view to the exit frame returned from the customExitFrameForOverlay: IGOverlayDelegate method. This animation type will also attempt to call the customExitAnimationForOverlay: IGOverlayDelegate method for any custom UIView property animations.
  • IGOverlayAnimationCustomSlide - the IGOverlayView will slide out of the view to the specified exit frame returned from the customExitFrameForOverlay: IGOverlayDelegate method. This animation type will also attempt to call the customExitAnimationForOverlay: IGOverlayDelegate method for any custom UIView property animations.

Declared In

IGOverlayView.h

  visible

Gets a value to determine whether or not the IGOverlayView is currently visible. This method will return YES if visible and NO if not visible.

@property (nonatomic, readonly) BOOL visible

Declared In

IGOverlayView.h

Animation Frame Position

– enterAnimationFrame:withAnimation:

Returns a CGRect containing the enter position of the IGOverlayView when shown in the specified view with the specified animation type.

- (CGRect)enterAnimationFrame:(UIView *)view withAnimation:(IGOverlayAnimationType)animationType

Parameters

view

The UIView in which the IGOverlayView will be shown.

animationType

The type of animation to use when the IGOverlayView is shown.

Discussion

Supported animation type key enumeration values:

  • IGOverlayAnimationNone - the IGOverlayView will appear with no animation.
  • IGOverlayAnimationSlideTop - the IGOverlayView will slide down from the top of the specified view.
  • IGOverlayAnimationSlideTopFade - the IGOverlayView will fade in and slide down from the top of the specified view.
  • IGOverlayAnimationSlideLeft - the IGOverlayView will slide into the specified view from the left.
  • IGOverlayAnimationSlideLeftFade - the IGOverlayView will fade in and slide from the left of the specified view.
  • IGOverlayAnimationSlideRight - the IGOverlayView will slide into the specified view from the right.
  • IGOverlayAnimationSlideRightFade - the IGOverlayView will fade in and slide from the right of the specified view.
  • IGOverlayAnimationSlideBottom - the IGOverlayView will slide up from bottom of the specified view.
  • IGOverlayAnimationSlideBottomFade - the IGOverlayView will fade in and slide up from the bottom of the specified view.
  • IGOverlayAnimationFade - the IGOverlayView will fade into the specified view.
  • IGOverlayAnimationCustomFade - the IGOverlayView will fade into from the specified enter frame returned from the customEnterFrameForOverlay: IGOverlayDelegate method into the specified view. This animation type will also attempt to call the customEnterAnimationForOverlay: IGOverlayDelegate method for any custom UIView property animations.
  • IGOverlayAnimationCustomSlide - the IGOverlayView will slide from the specified enter frame returned from the customExitFrameForOverlay: IGOverlayDelegate method into the specified view. This animation type will also attempt to call the customEnterAnimationForOverlay: IGOverlayDelegate method for any custom UIView property animations.

Declared In

IGOverlayView.h

– exitAnimationFrame:withAnimation:

Returns a CGRect containing the exit position of the IGOverlayView when dismissed from the specified view with the specified animation type.

- (CGRect)exitAnimationFrame:(UIView *)view withAnimation:(IGOverlayAnimationType)animationType

Parameters

view

The UIView in which the IGOverlayView will be shown.

animationType

The type of animation to use when the IGOverlayView is dismissed.

Discussion

Supported animation type key enumeration values:

  • IGOverlayAnimationNone - the IGOverlayView will be dismissed with no animation.
  • IGOverlayAnimationSlideTop - the IGOverlayView will slide up and out of the specified view.
  • IGOverlayAnimationSlideTopFade - the IGOverlayView will fade out and slide up and out of the specified view.
  • IGOverlayAnimationSlideLeft - the IGOverlayView will slide out of the specified view to the left.
  • IGOverlayAnimationSlideLeftFade - the IGOverlayView will fade out and slide left and out of the specified view.
  • IGOverlayAnimationSlideRight - the IGOverlayView will slide out of the specified view to the right.
  • IGOverlayAnimationSlideRightFade - the IGOverlayView will fade out and slide right and out of the specified view.
  • IGOverlayAnimationSlideBottom - the IGOverlayView will slide down and out of the specified view.
  • IGOverlayAnimationSlideBottomFade - the IGOverlayView will fade out and slide down out and out of the specified view.
  • IGOverlayAnimationFade - the IGOverlayView will fade out of the specified view.
  • IGOverlayAnimationCustomFade - the IGOverlayView will fade out of the view to the exit frame returned from the customExitFrameForOverlay: IGOverlayDelegate method. This animation type will also attempt to call the customExitAnimationForOverlay: IGOverlayDelegate method for any custom UIView property animations.
  • IGOverlayAnimationCustomSlide - the IGOverlayView will slide out of the view to the specified exit frame returned from the customExitFrameForOverlay: IGOverlayDelegate method. This animation type will also attempt to call the customExitAnimationForOverlay: IGOverlayDelegate method for any custom UIView property animations.

Declared In

IGOverlayView.h