Need help with GCDiscreetNotificationView?
Click the “chat” button below for chat support from the developer who created it, or find similar developers for support.

About the developer

gcamp
416 Stars 82 Forks Other 56 Commits 4 Opened issues

Description

A discreet, non-modal, notification view for iOS.

Services available

!
?

Need anything else?

Contributors list

# 22,552
Objecti...
carthag...
cocoapo...
tvos
43 commits
# 166,886
Objecti...
Shell
C++
nscolor
2 commits
# 572,105
Objecti...
1 commit
# 24,177
Objecti...
Sketch
keyboar...
Xcode
1 commit
# 570,608
Objecti...
1 commit
# 168,909
Objecti...
Swift
swift-f...
carthag...
1 commit

h1. GCDiscreetNotificationView

GCDiscreetNotificationView is a discreet, non-modal, notification view for iOS. You can use it to show an activity or state of you app without blocking the user interactions.

!http://i.imgur.com/8vcti5u.png!

GCDiscreetNotificationView features:

  • Easy to use : init and show
  • Can show an activity indicator
  • Two presentation mode (top and bottom)
  • All properties (text, activity and presentation mode) can be changed in a animated fashion

h2. Usage

(See the demo project included)

You simply allocate the notification view with one of the following methods.

The parameters are the following : * text : the text presented on the notification * activity : if set to @[email protected], the notification with show a activity indicator * aPresentationMode : the presentation mode of the notification (top or bottom) * aView : the view that will contain the notification. The view should be able to accept subviews (will not work on a @[email protected] for example)

- (id) initWithText:(NSString *)text inView:(UIView *)aView;
- (id) initWithText:(NSString *)text showActivity:(BOOL)activity inView:(UIView *)aView;
- (id) initWithText:(NSString *)text showActivity:(BOOL)activity inPresentationMode:(GCDiscreetNotificationViewPresentationMode) aPresentationMode inView:(UIView *)aView;

You show or hide the notification with these methods. The @[email protected] will hide your notification automatically after 1 second.

- (void) showAnimated;
- (void) hideAnimated;
- (void) hideAnimatedAfter:(NSTimeInterval) timeInterval;
- (void) show:(BOOL) animated;
- (void) hide:(BOOL) animated;
- (void) showAndDismissAutomaticallyAnimated;
- (void) showAndDismissAfter:(NSTimeInterval) timeInterval;

You can change the text of the label of the activity viewing at any moment with these properties.

@property (nonatomic, assign) UIView *view;
@property (nonatomic, assign) GCDiscreetNotificationViewPresentationMode presentationMode;
@property (nonatomic, copy) NSString* textLabel;
@property (nonatomic, assign) BOOL showActivity;

These properties can be changed in a animated fashion (except the view).

- (void) setTextLabel:(NSString *) aText animated:(BOOL) animated;
- (void) setShowActivity:(BOOL) activity animated:(BOOL) animated;
- (void) setTextLabel:(NSString *)aText andSetShowActivity:(BOOL)activity animated:(BOOL)animated;
- (void) setPresentationMode:(GCDiscreetNotificationViewPresentationMode) newPresentationMode animated:(BOOL) animated;

You can access directly the notification's label and activity indicator. And change some propreties on that label and activity indicator. If you want to change the label's text or hide the indicator, use @[email protected] or @[email protected] instead.

@property (nonatomic, retain, readonly) UILabel *label;  
@property (nonatomic, retain, readonly) UIActivityIndicatorView *activityIndicator;

We use cookies. If you continue to browse the site, you agree to the use of cookies. For more information on our use of cookies please see our Privacy Policy.