2016-09-16 66 views
1

頭的夫特3管理我有一個的viewController作爲標題爲部分

class MyController: UIViewController , UITableViewDelegate, UITableViewDataSource, UISearchBarDelegate 

我設置DataSource和使用該故事板 和在這個類我已實施的方法的代表:

  1. tableView titleForHeaderInSection
  2. tableView sectionForSectionIndexTitle
  3. sectionIndexTitles。

我想實現與聯繫人應用程序具有相同行爲的應用程序。 但問題是,部分標題似乎從列表中分離,如果我滾動列表該部分的標題不會滑......

enter image description here

任何幫助,將不勝感激 感謝

回答

0

是一個約束問題,我使用StackView解決了這個問題。我把SearchBar和UITableView放入StackView中,並以這種方式獲得垂直對齊。現在是工作。 enter image description here