2010-12-06 120 views

回答

1

使由IBOutlet中工具栏,并设置其y坐标为100或以上视图的高度。那么特别是动作会相应地改变y坐标。这是通过动画完成的。

你也可以在键盘上使用它。

使用 - (空)keyboardWillShow:(NSNotification *)注意 和 - (空)keyboardWillHide:(NSNotification *)注意

-1

我创建了一个自定义视图,并一起加入上一个完成按钮选取器视图。

感谢

0
UIToolBar *toolBar= [[UIToolbar alloc] initWithFrame:CGRectMake(0,0,320,44)]; 
     [toolBar setBarStyle:UIBarStyleBlackOpaque]; 
     UIBarButtonItem *barButtonDone = [[UIBarButtonItem alloc] initWithTitle:@"Done" style:UIBarButtonItemStyleBordered target:self action:@selector(doneBtnTapped:)]; 

     toolBar.items = [[NSArray alloc] initWithObjects:barButtonDone,nil]; 
     barButtonDone.tintColor=[UIColor blackColor]; 
     [popoverView addSubview:toolBar]; 

     [popoverView addSubview:pickerView]; 
相关问题