Skip to content

vinnyt/NoticeView

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 

Repository files navigation

NoticeView

A TweetBot-like notice component for iOS.


![Alt text](http://cloud.github.com/downloads/tciuro/NoticeView/screenshot.png)

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.

About

A TweetBot-like notice component for iOS.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published