2017-02-09 72 views
0

在此先感謝您的幫助。如何在Swift中打開搜索tableView

我要打開這種類型的屏幕

enter image description here

當這樣的國家代碼用戶水龍頭!

enter image description here

我在iOS開發新手。我不知道該怎麼做,請幫助我。

+0

您可以查看它。在該視圖中用於搜索的表格視圖和文本框。當點擊國家代碼打開此視圖,並選擇關閉它後 –

+0

嘗試UISearchController –

+0

或者你可以使用tableview與searchcontroller而不是 –

回答

1

我在我的應用程序的人做這個..

  • 如果您正在使用賽格瑞從情節串連圖板展示國家選擇視圖控制器,然後設置segue設置在下面的圖片與透明背景
  • 呈現視圖

SegueSettings

  • 如果您出示您的視圖控制器編程,設置modalPresentationStyleOverCurrentContext

    讓modalView = self.storyboard .instantiateViewControllerWithIdentifier( 「CountrySelectionViewID」) modalView .modalPresentationStyle = UIModalPresentationStyle.OverCurrentContext self.presentViewController?(modalView,動畫:真,完成:無)

  • 使用UIViewControllerUITableView作爲子視圖,這樣就可以設置在0.7左右

  • Implem爲tableview中的邊距和設置背景色爲黑色阿爾法值爲您的國家/地區選擇視圖提供代表功能以瞭解選擇哪個國家/地區

+0

謝謝,我會嘗試後,我會回來給你。 @raki –

+0

謝謝@raki。它正是我想要的。 –

相關問題