+(void)showMessage:(NSString*)message
{
UIWindow*
window = [UIApplicationsharedApplication].keyWindow;
UIView*showview
= [[UIViewalloc]init];
showview.backgroundColor
= [UIColorblackColor];
showview.frame
= CGRectMake(1, 1, 1, 1);
showview.alpha
= 1.0f;
showview.layer.cornerRadius
= 5.0f;
showview.layer.masksToBounds
= YES;
[window
addSubview:showview];
UILabel*label
= [[UILabelalloc]init];
CGSize
LabelSize = [message sizeWithFont:[UIFontsystemFontOfSize:17]
constrainedToSize:CGSizeMake(290, 9000)];
label.frame
= CGRectMake(10, 5, LabelSize.width, LabelSize.height);
label.text
= message;
label.textColor
= [UIColorwhiteColor];
label.textAlignment
= 1;
label.backgroundColor
= [UIColorclearColor];
label.font
= [UIFontboldSystemFontOfSize:15];
[showview
addSubview:label];
showview.frame
= CGRectMake((SCREEN_WIDTH - LabelSize.width - 20)/2, SCREEN_HEIGHT - 100, LabelSize.width+20, LabelSize.height+10);
[UIViewanimateWithDuration:1.5
animations:^{
showview.alpha
= 0;
}
completion:^(BOOLfinished)
{
[showview
removeFromSuperview];
}];
}