Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
A TweetBot-like notice component for iOS.
Objective-C Ruby

Fetching latest commit…

Cannot retrieve the latest commit at this time

Failed to load latest commit information.
NoticeView.xcodeproj
NoticeView
LICENSE
README.md

README.md

NoticeView

A TweetBot-like notice component for iOS.


Alt text

Usage

  • Drop the WBNoticeView folder in your project
  • Add QuartzCore.framework to your project

Examples

To display a small error notice:

WBNoticeView *nm = [WBNoticeView defaultManager];
[nm showErrorNoticeInView:self.view title:@"Network Error" message:@"Check your network connection."];

To display a large error notice, make the text long enough to wrap to another line. Only two lines are supported. If the text doesn't fit in two lines, an ellipsis will be appended at the end of the second line:

WBNoticeView *nm = [WBNoticeView defaultManager];
[nm showErrorNoticeInView:self.view title:@"Network Error" message:@"Check your network connection. Twitter could also be down."];

To display a small success notice:

WBNoticeView *nm = [WBNoticeView defaultManager];
[nm showSuccessNoticeInView:self.view message:@"Link Saved Successfully"];

Notes

If you pass nil instead of a valid UIView, an NSInvalidArgumentException exception will be raised.

The default values are the following:

    if (nil == title) title = @"Unknown Error";
    if (nil == message) message = @"Information not provided.";
    if (0.0 == duration) duration = 0.3;
    if (0.0 == delay) delay = 2.0;

Contribute

I'd love to include your contributions. Feel free to improve it, send comments or suggestions. If you have improvements please send me a pull request.

Contact Me

You can ping me on Twitter — @titusmagnus.

Something went wrong with that request. Please try again.