我有一个UIViewController,当按下一个按钮时,我想要一个半屏视图,用UIPicker向上滑动.
我在IB中使用UIPicker创建了一个UIView,还有一个带有完成/取消按钮的UIToolBar.
我怎样才能使这个半视图向上滑动,背景视图仍然显示但是暗淡或无法播放.
到目前为止我正在使用此代码:
- (void)showModalView { [self.popupView setFrame:CGRectMake(0,self.view.frame.size.height,self.view.frame.size.width,self.view.frame.size.height)]; [self.view addSubview:self.popupView]; [UIView animateWithDuration:.2 animations:^{ [self.popupView setFrame:CGRectMake(0,self.view.frame.size.height)]; }]; }
这是一张照片:http://www.box.net/shared/static/08ji4s0f6i1b8qubrtz6.png