如果有导航栏时,把自定义的UIView 放到window上
需要
+ (AppDelegate *)shareAppDelegate {
return (AppDelegate *)[UIApplication sharedApplication].delegate;
}
[helpView setTag:6534];
[[AppDelegate shareAppDelegate].window addSubview:helpView];
动画显示提示框
[UIView animateWithDuration:0.2f animations:^{
[diaView setFrame:CGRectMake(diaView.frame.origin.x, kScreenBounds.size.height-230.0f, diaView.frame.size.width , diaView.frame.size.height)];
} completion:^(BOOL finished) {
}];
//清除对话框
- (void)removeDiaView:(id)sender{
[UIView animateWithDuration:0.2f animations:^{
[diaView setFrame:CGRectMake(diaView.frame.origin.x, kScreenBounds.size.height+20.0f, diaView.frame.size.width , diaView.frame.size.height)];
} completion:^(BOOL finished) {
[[[AppDelegate shareAppDelegate].window viewWithTag:6534] removeFromSuperview];
}];
}