TestsTested | ✗ |
LangLanguage | Obj-CObjective C |
License | MIT |
ReleasedLast Release | Aug 2016 |
Maintained by Samuel ZhaoY.
GZToast is a toast widget which enabe user to build up toast view in iOS apps with three common default styles. At the same time, developer can also easily insert an customized toasting content of one's own. Users can also define popup time and completion callback of one's own
This project now support screen rotation.
What's next:
pod install
from the Example directory first.[[GZToastView toastWithText:@"toast style 1"] showForDuration:4
onCompletion:^{
NSLog(@"Toast complete");
}];
[[GZToastView toastWithText:@"toast style 2: icon with corresponding toast description. Adding the long desc to see the overall layout."
icon:[UIImage imageNamed:@"Icon.png"]]
showForDuration:4
onCompletion:^{
NSLog(@"Toast complete");
}];
[[GZToastView toastWithText:@"toast style 3: icon with corresponding toast description. Adding the long desc to see the overall layout."
icon:[UIImage imageNamed:@"Icon.png"]
title:@"Title"]
showForDuration:4
onCompletion:^{
NSLog(@"Toast complete");
}];
UIActivityIndicatorView* indicator = [[UIActivityIndicatorView alloc] initWithActivityIndicatorStyle:UIActivityIndicatorViewStyleWhiteLarge];
indicator.frame = CGRectMake(0, 0, 55, 55);
[indicator startAnimating];
[[GZToastView toastWithCustomizedContent:indicator] showForDuration:4
onCompletion:^{
NSLog(@"Toast complete");
[indicator stopAnimating];
}];
Since this is a small project, you can also copy the source code:
GZToastView.h
GZToastView.m
to you project.
samuel.zhao.yue, [email protected]
Toast is available under the MIT license. See the LICENSE file for more info.