Latest 0.5.4
Homepage https://github.com/problame/CSNotificationView
License MIT License
Platforms ios 7.0, requires ARC

Easy to use, semi-translucent and blurring notification view that drops into UIView, UITableView, UICollectionView.
Also supports displaying progress.

Supports iOS 7 and iOS 8. Requires Xcode 6.


 

 

Example code

Quick presentation

[CSNotificationView showInViewController:self
                                    style:CSNotificationViewStyleError
                                  message:@"A critical error happened."];

[CSNotificationView showInViewController:self
                                    style:CSNotificationViewStyleSuccess
                                  message:@"Great, it works."];

UIActivityIndicatorView built-in

CSNotificationView* note = (...);
note.showingActivity = YES;

[note setVisible:YES animated:YES completion:nil];
(...)
[note dismissWithStyle:CSNotificationViewStyleSuccess message:@"Success!"
          duration:kCSNotificationViewDefaultShowDuration animated:YES];

Tap handling

Handle tap events on the notification using a block callback

    __block typeof(self) weakSelf = self;
    self.loadingNotificationView.tapHandler = ^{
        [weakSelf cancelOperationXYZ];
        [weakSelf.loadingNotificationView dismissWithStyle:CSNotificationViewStyleError
                                       message:@"Cancelled"
                                      duration:kCSNotificationViewDefaultShowDuration animated:YES];
    };

Customization

Custom image / icon

note.image = [UIImage imageNamed:@"mustache"];

Flexible with text & no images

[CSNotificationView showInViewController:self
        tintColor:[UIColor colorWithRed:0.000 green:0.6 blue:1.000 alpha:1]
            image:nil
          message:@"No icon and a message that needs two rows and extra 
                    presentation time to be displayed properly."
         duration:5.8f];

License

See LICENSE.md

Latest podspec

{
    "name": "CSNotificationView",
    "version": "0.5.4",
    "summary": "Drop-in, semi-translucent and blurring notification view.",
    "homepage": "https://github.com/problame/CSNotificationView",
    "license": {
        "type": "MIT License",
        "file": "LICENSE.md"
    },
    "authors": "Christian Schwarz",
    "source": {
        "git": "https://github.com/problame/CSNotificationView.git",
        "tag": "0.5.4"
    },
    "platforms": {
        "ios": "7.0"
    },
    "requires_arc": true,
    "source_files": "CSNotificationView/*.{h,m}",
    "resource_bundles": {
        "CSNotificationView": [
            "CSNotificationView/Resources/*.png"
        ]
    }
}

Pin It on Pinterest

Share This