项目中需要用到类似于Android的Toast的功能,所以现写了一个。
GitHub路径:
https://github.com/wsjisji/UIToast
使用方法如下:
1.下载 UIToast(.h and .m) 和 UIRotateViewController(.h and .m)两个类.
2.将下载的4个文件添加到你的xcode工程中.
3.使用如下代码显示Toast:
UIToast* toast = [[UIToast alloc] init]; [toast showToast:@"Enjoy the UIToast!" tiemInterval:4.0]; [toast release];