如何打开像一个弹出一个新的UIView? [英] how to open a new uiview like a popup?

查看:152
本文介绍了如何打开像一个弹出一个新的UIView?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个的TabBar应用程序。有在标签中的一个按钮。
我想通过像弹出动画打开一个新的UIViewController当我preSS的按钮。
popupviewcontroller有一个UIWebView。我要显示在弹出地查看某些网页。
我在设计的IB popupview。

i have a tabbar app. there is a button in one of tab. i want to open a new uiviewcontroller by animation like popup when i press the button. popupviewcontroller has a uiwebview. i want to show some web pages in popup view. i designed the popupview in IB.

我怎么能打开我的popupviewcontroller像FBConnect动画。
FBconnect打开像一个弹出动画登录对话框视图。

how can i open my popupviewcontroller with animation like FBConnect. FBconnect opens the login dialog view with animation like a popup.

推荐答案

您将无法像弹出一个UIViewController打开。

You won't be able to open like a popup a UIViewController.

有关,你将不得不使用一个简单的UIView

For that you will have to use a simple UIView

添加的UIView(弹出形状等),以当前视图。

Add the UIview (popup shape like) to your current view.

- (void) initPopUpView {
  popup.alpha = 0;
  popup.frame = CGRectMake (160, 240, 0, 0);
  [self.view addSubview:popup];
}

- (void) animatePopUpShow {
  [UIView beginAnimations:nil context:NULL];
  [UIView setAnimationDuration:0.3];
  [UIView setAnimationDelegate:self];
  [UIView setAnimationWillStartSelector:@selector(initPopUpView)];

  popup.alpha = 1;
  popup.frame = CGRectMake (20, 40, 300, 400);

  [UIView commitAnimations];
}

这篇关于如何打开像一个弹出一个新的UIView?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆