2010-12-06 118 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]; 
相關問題