Setup Instructions
- Add
Toast+UIView.h
&Toast+UIView.m
to your project. - Link against QuartzCore.
- If you're using ARC, you'll need to add the
-fno-objc-arc
compiler flag toToast+UIView.m
.
Examples
// basic usage [self.view makeToast:@"This is a piece of toast."]; // toast with duration, title, and position [self.view makeToast:@"This is a piece of toast with a title." duration:3.0 position:@"top" title:@"Toast Title"]; // toast with an image [self.view makeToast:@"This is a piece of toast with an image." duration:3.0 position:[NSValue valueWithCGPoint:CGPointMake(110, 110)] image:[UIImage imageNamed:@"toast.png"]]; // display toast with an activity spinner [self.view makeToastActivity];
See the demo project for more examples.