申報.h文件中
的UIView *根;
在.m文件
進口QuartzCore/QuartzCore.h
- (void)viewDidLoad
{
[super viewDidLoad];
root = [[UIView alloc] initWithFrame:CGRectMake(60, 50, 220, 250)];
root.backgroundColor=[UIColor grayColor];
root.layer.cornerRadius=10;
UILabel *label=[[UILabel alloc] initWithFrame:CGRectMake(10, 100, 200, 50)];
label.backgroundColor=[UIColor clearColor];
label.numberOfLines=3;
label.font=[UIFont fontWithName:@"Arial" size:14];
label.lineBreakMode=UILineBreakModeTailTruncation;
label.textColor=[UIColor whiteColor];
[email protected]"Make your first entry by tapping the button at the top of the screen";
[root addSubview:label];
[self.view addSubview:root];
}
您的按鈕事件方法內
[根removeFromSuperview];
你可以使用['MBProgressHUD'](https://github.com/jdg/MBProgressHUD) – Ilanchezhian 2012-02-08 06:34:19