Inherits from UIView
Declared in TWSReleaseNotesView.h
TWSReleaseNotesView.m

Overview

Use the TWSReleaseNotesView class to display a custom release notes view, to be shown when the app is opened for the first time after an update.

If you want to check if the app is on its first launch, you can use the isAppOnFirstLaunch method. This method will check a previously stored app version string. If a stored app version string does not exist, it will return YES, storing the current version string.

In order to check if the app was updated, the isAppVersionUpdated method can be used. This method will check a previously stored app version string. If a stored app version string is present but it does not match the current version string, it will return YES, storing the current version string.

The release notes view can be initialized using the viewWithReleaseNotesTitle:text:closeButtonTitle: class method, if the release notes text is set directly when calling the method. If the release notes must be retrieved from the App Store, you must use the setupViewWithAppIdentifier:releaseNotesTitle:closeButtonTitle:completionBlock: class method.

The appearance of the view can be customized using its alpha, color and font properties, to be set before showing the release notes view with the showInView: instance method.

Tasks

Setting main properties

  •   overlayAlpha

    The alpha value for the overlay to be applied to the container view. Default is 0.5f.

    property
  •   textViewAlpha

    The alpha value for the background color to be applied to the text container view. Default is 0.8f.

    property
  •   textViewBackgroundColor

    The background color to be applied to the text container view. Default is [UIColor blackColor].

    property
  •   darkSeparatorColor

    The dark separator color. Default is [UIColor colorWithRed:16.0f/255.0f green:16.0f/255.0f blue:16.0f/255.0f alpha:1.0].

    property
  •   lightSeparatorColor

    The light separator color. Default is [UIColor colorWithRed:58.0f/255.0f green:58.0f/255.0f blue:65.0f/255.0f alpha:1.0].

    property
  •   viewShadowColor

    The shadow color for the release notes view. Default is [UIColor blackColor].

    property
  •   viewShadowOffset

    The shadow offset for the release notes view. Default is (0.0f, 3.0f).

    property
  •   viewShadowRadius

    The shadow radius for the release notes view. Default is 3.0f.

    property
  •   viewShadowOpacity

    The shadow opacity for the release notes view. Default is 1.0f.

    property
  •   titleFont

    The font for the title label. Default is [UIFont systemFontOfSize:16.0f].

    property
  •   titleColor

    The color for the title label. Default is [UIColor whiteColor].

    property
  •   titleShadowColor

    The shadow color for the title label. Default is [UIColor blackColor].

    property
  •   titleShadowOffset

    The shadow offset for the title label. Default is (0.0f, -1.0f).

    property
  •   releaseNotesFont

    The font for the release notes text view. Default is [UIFont systemFontOfSize:14.0f].

    property
  •   releaseNotesColor

    The color for the release notes text view. Default is [UIColor whiteColor].

    property
  •   releaseNotesShadowColor

    The shadow color for the release notes text view. Default is [UIColor blackColor].

    property
  •   releaseNotesShadowOffset

    The shadow offset for the release notes text view. Default is (0.0f, -1.0f).

    property
  •   closeButtonFont

    The font for the close button. Default is [UIFont systemFontOfSize:16.0f].

    property
  •   closeButtonColor

    The color for the close button. Default is [UIColor whiteColor].

    property
  •   closeButtonShadowColor

    The shadow color for the close button. Default is [UIColor blackColor].

    property
  •   closeButtonShadowOffset

    The shadow offset for the close button. Default is (0.0f, -1.0f).

    property

Creating the release notes view

Checking the app version

Showing the release notes view

  • – showInView:

    Shows the release notes view in the specified container view.

Properties

closeButtonColor

The color for the close button. Default is [UIColor whiteColor].

@property (strong, nonatomic) UIColor *closeButtonColor

Declared In

TWSReleaseNotesView.h

closeButtonFont

The font for the close button. Default is [UIFont systemFontOfSize:16.0f].

@property (strong, nonatomic) UIFont *closeButtonFont

Declared In

TWSReleaseNotesView.h

closeButtonShadowColor

The shadow color for the close button. Default is [UIColor blackColor].

@property (strong, nonatomic) UIColor *closeButtonShadowColor

Declared In

TWSReleaseNotesView.h

closeButtonShadowOffset

The shadow offset for the close button. Default is (0.0f, -1.0f).

@property (assign, nonatomic) CGSize closeButtonShadowOffset

Declared In

TWSReleaseNotesView.h

darkSeparatorColor

The dark separator color. Default is [UIColor colorWithRed:16.0f/255.0f green:16.0f/255.0f blue:16.0f/255.0f alpha:1.0].

@property (strong, nonatomic) UIColor *darkSeparatorColor

Declared In

TWSReleaseNotesView.h

lightSeparatorColor

The light separator color. Default is [UIColor colorWithRed:58.0f/255.0f green:58.0f/255.0f blue:65.0f/255.0f alpha:1.0].

@property (strong, nonatomic) UIColor *lightSeparatorColor

Declared In

TWSReleaseNotesView.h

overlayAlpha

The alpha value for the overlay to be applied to the container view. Default is 0.5f.

@property (assign, nonatomic) CGFloat overlayAlpha

Declared In

TWSReleaseNotesView.h

releaseNotesColor

The color for the release notes text view. Default is [UIColor whiteColor].

@property (strong, nonatomic) UIColor *releaseNotesColor

Declared In

TWSReleaseNotesView.h

releaseNotesFont

The font for the release notes text view. Default is [UIFont systemFontOfSize:14.0f].

@property (strong, nonatomic) UIFont *releaseNotesFont

Declared In

TWSReleaseNotesView.h

releaseNotesShadowColor

The shadow color for the release notes text view. Default is [UIColor blackColor].

@property (strong, nonatomic) UIColor *releaseNotesShadowColor

Declared In

TWSReleaseNotesView.h

releaseNotesShadowOffset

The shadow offset for the release notes text view. Default is (0.0f, -1.0f).

@property (assign, nonatomic) CGSize releaseNotesShadowOffset

Declared In

TWSReleaseNotesView.h

textViewAlpha

The alpha value for the background color to be applied to the text container view. Default is 0.8f.

@property (assign, nonatomic) CGFloat textViewAlpha

Declared In

TWSReleaseNotesView.h

textViewBackgroundColor

The background color to be applied to the text container view. Default is [UIColor blackColor].

@property (strong, nonatomic) UIColor *textViewBackgroundColor

Declared In

TWSReleaseNotesView.h

titleColor

The color for the title label. Default is [UIColor whiteColor].

@property (strong, nonatomic) UIColor *titleColor

Declared In

TWSReleaseNotesView.h

titleFont

The font for the title label. Default is [UIFont systemFontOfSize:16.0f].

@property (strong, nonatomic) UIFont *titleFont

Declared In

TWSReleaseNotesView.h

titleShadowColor

The shadow color for the title label. Default is [UIColor blackColor].

@property (strong, nonatomic) UIColor *titleShadowColor

Declared In

TWSReleaseNotesView.h

titleShadowOffset

The shadow offset for the title label. Default is (0.0f, -1.0f).

@property (assign, nonatomic) CGSize titleShadowOffset

Declared In

TWSReleaseNotesView.h

viewShadowColor

The shadow color for the release notes view. Default is [UIColor blackColor].

@property (strong, nonatomic) UIColor *viewShadowColor

Declared In

TWSReleaseNotesView.h

viewShadowOffset

The shadow offset for the release notes view. Default is (0.0f, 3.0f).

@property (assign, nonatomic) CGSize viewShadowOffset

Declared In

TWSReleaseNotesView.h

viewShadowOpacity

The shadow opacity for the release notes view. Default is 1.0f.

@property (assign, nonatomic) CGFloat viewShadowOpacity

Declared In

TWSReleaseNotesView.h

viewShadowRadius

The shadow radius for the release notes view. Default is 3.0f.

@property (assign, nonatomic) CGFloat viewShadowRadius

Declared In

TWSReleaseNotesView.h

Class Methods

isAppOnFirstLaunch

Checks if the app version key is currently stored or not.

+ (BOOL)isAppOnFirstLaunch

Return Value

Returns YES if no previous app version string was stored, NO otherwise.

Declared In

TWSReleaseNotesView.h

isAppVersionUpdated

Checks for app update state, using the CFBundleVersion key in the application Info.plist.

+ (BOOL)isAppVersionUpdated

Return Value

Returns YES if a previous app version string was stored and if it does not match the current version string, NO otherwise.

Declared In

TWSReleaseNotesView.h

setupViewWithAppIdentifier:releaseNotesTitle:closeButtonTitle:completionBlock:

Creates a release notes view initialized with custom parameters and returns it in the completion block.

+ (void)setupViewWithAppIdentifier:(NSString *)appIdentifier releaseNotesTitle:(NSString *)releaseNotesTitle closeButtonTitle:(NSString *)closeButtonTitle completionBlock:(void ( ^ ) ( TWSReleaseNotesView *releaseView , NSString *releaseNoteText , NSError *error ))completionBlock

Parameters

appIdentifier

The App Store app identifier for remote release notes retrieval.

releaseNotesTitle

The title for the release notes view.

closeButtonTitle

The title for the close button.

completionBlock

The block to be used as a completion handler. If the release notes retrieval is successful, a reference to the initialized release notes view is passed to the block. A NSError object is passed to the block otherwise.

Declared In

TWSReleaseNotesView.h

viewWithReleaseNotesTitle:text:closeButtonTitle:

Returns a release notes view initialized with custom parameters.

+ (TWSReleaseNotesView *)viewWithReleaseNotesTitle:(NSString *)releaseNotesTitle text:(NSString *)releaseNotesText closeButtonTitle:(NSString *)closeButtonTitle

Parameters

releaseNotesTitle

The title for the release notes view.

releaseNotesText

The release notes text.

closeButtonTitle

The title for the close button.

Return Value

The initialized release notes view.

Declared In

TWSReleaseNotesView.h

Instance Methods

showInView:

Shows the release notes view in the specified container view.

- (void)showInView:(UIView *)containerView

Parameters

containerView

The container view in which the release notes view must be shown.

Declared In

TWSReleaseNotesView.h