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