Skip to content

Commit

Permalink
Added ‘setDelegateForPushNote’.
Browse files Browse the repository at this point in the history
  • Loading branch information
avielg committed Aug 16, 2014
1 parent 4fa916e commit 5f17085
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
3 changes: 2 additions & 1 deletion AGPushNote/AGPushNoteView.h
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@
@optional
- (void)pushNoteDidAppear; // Called after the view has been fully transitioned onto the screen. (equel to completion block).
- (void)pushNoteWillDisappear; // Called before the view is hidden, after the message action block.

@end

@interface AGPushNoteView : UIToolbar
+ (void)showWithNotificationMessage:(NSString *)message;
+ (void)showWithNotificationMessage:(NSString *)message completion:(void (^)(void))completion;
Expand All @@ -21,6 +21,7 @@
+ (void)awake;

+ (void)setMessageAction:(void (^)(NSString *message))action;
+ (void)setDelegateForPushNote:(id<AGPushNoteViewDelegate>)delegate;

@property (nonatomic, weak) id<AGPushNoteViewDelegate> pushNoteDelegate;
@end
6 changes: 5 additions & 1 deletion AGPushNote/AGPushNoteView.m
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,10 @@ + (instancetype)sharedPushView
return nil;
}

+ (void)setDelegateForPushNote:(id<AGPushNoteViewDelegate>)delegate {
[PUSH_VIEW setPushNoteDelegate:delegate];
}

#pragma mark - Lifecycle (of sort)
- (id)initWithFrame:(CGRect)frame
{
Expand Down Expand Up @@ -143,7 +147,7 @@ + (void)showWithNotificationMessage:(NSString *)message completion:(void (^)(voi
}];

//Start timer (Currently not used to make sure user see & read the push...)
// PUSH_VIEW.closeTimer = [NSTimer scheduledTimerWithTimeInterval:CLOSE_PUSH_SEC target:[AGPushNoteView class] selector:@selector(close) userInfo:nil repeats:NO];
// PUSH_VIEW.closeTimer = [NSTimer scheduledTimerWithTimeInterval:CLOSE_PUSH_SEC target:[IAAPushNoteView class] selector:@selector(close) userInfo:nil repeats:NO];
}
}
+ (void)closeWitCompletion:(void (^)(void))completion {
Expand Down

0 comments on commit 5f17085

Please sign in to comment.