Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions TWSReleaseNotesView/TWSReleaseNotesView.h
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@

#import <UIKit/UIKit.h>

typedef void (^TWSReleaseNotesViewCompletionHandler)(void);

/**
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.

Expand Down Expand Up @@ -87,6 +89,8 @@
/// The shadow offset for the close button. Default is `(0.0f, -1.0f)`.
@property (assign, nonatomic) CGSize closeButtonShadowOffset;

/// A completion handler
@property (copy, nonatomic) TWSReleaseNotesViewCompletionHandler handler;

/** @name Creating the release notes view */

Expand Down
3 changes: 3 additions & 0 deletions TWSReleaseNotesView/TWSReleaseNotesView.m
Original file line number Diff line number Diff line change
Expand Up @@ -377,6 +377,7 @@ - (void)prepareToShowInView:(UIView *)containerView

[self.textView setFont:self.releaseNotesFont];
[self.textView setTextColor:self.releaseNotesColor];
[self.textView setContentOffset:CGPointMake(0, 0) animated:NO];
[self.textView.layer setShadowColor:[self.releaseNotesShadowColor CGColor]];
[self.textView.layer setShadowOffset:self.releaseNotesShadowOffset];

Expand Down Expand Up @@ -466,6 +467,8 @@ - (void)dismiss
if (finished)
{
[self removeFromSuperview];
if (self.handler)
self.handler();
}
}];
}
Expand Down