Skip to content
This repository has been archived by the owner on Feb 23, 2021. It is now read-only.

Commit

Permalink
Allow posting of a message with an explicit duration.
Browse files Browse the repository at this point in the history
  • Loading branch information
benjaminscott committed Feb 17, 2011
1 parent 3e6caf5 commit cac4ee1
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 0 deletions.
1 change: 1 addition & 0 deletions MTStatusBarOverlay.h
Expand Up @@ -181,6 +181,7 @@ typedef enum MTMessageType {

// shows an activity indicator and the given message
- (void)postMessage:(NSString *)message;
- (void)postMessage:(NSString *)message duration:(NSTimeInterval)duration;
- (void)postMessage:(NSString *)message animated:(BOOL)animated;
// clears the message queue and shows this message instantly
- (void)postImmediateMessage:(NSString *)message animated:(BOOL)animated;
Expand Down
4 changes: 4 additions & 0 deletions MTStatusBarOverlay.m
Expand Up @@ -444,6 +444,10 @@ - (void)postMessage:(NSString *)message animated:(BOOL)animated {
[self postMessage:message type:MTMessageTypeActivity duration:0 animated:animated immediate:NO];
}

- (void)postMessage:(NSString *)message duration:(NSTimeInterval)duration {
[self postMessage:message type:MTMessageTypeActivity duration:duration animated:YES immediate:NO];
}

- (void)postImmediateMessage:(NSString *)message animated:(BOOL)animated {
[self postImmediateMessage:message type:MTMessageTypeActivity duration:0 animated:animated];
}
Expand Down

0 comments on commit cac4ee1

Please sign in to comment.