本文介绍了如何通过UITabbar控制器创建UIPickerView?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在我的应用中,我有一个 UITabBarController .在一个 UIViewController 中,我想要一个 UIPickerView .我在.code> xib 文件本身,方法是将其添加到单独的视图中,并保持其脱离框架,直到用户单击该按钮为止.当用户单击该按钮时,我未隐藏此视图并设置了动画(如键盘).但是我的问题是,当 UIPickerView 出现时,它位于 UITabBarController 下,即,tabbar控制器隐藏了 UIPickerView 的一半.我想保留我的 UITabBarController 上的code> UIPickerView .如何执行此操作.请帮忙.

In my app I have a UITabBarController.In one UIViewController I want to have a UIPickerView.I added this pickerview in the .xib file itself by adding it in separate view and keeping it out of frame until user taps the button.when the user taps the button,I unhidden this view and set a animation like keyboard.But my problem is, when the UIPickerView comes,it is coming under the UITabBarController ie.,tabbar controller is hiding half of the UIPickerView.I want to keep my UIPickerView over that UITabBarController.How can I do this.Please help.

谢谢.

推荐答案

添加pickerView之后(我认为它在您的 UIViewController 中)

After you add pickerView(I think it's in your UIViewController)

- (void)viewDidLoad
{
    ...
    [self.view addSubview:self.pickerView];
    [self.view bringSubviewToFront:self.pickerView];
    ...
}

这篇关于如何通过UITabbar控制器创建UIPickerView?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

10-26 22:52