0
我在Xcode中啓動了TabBar應用程序。然後我添加了一個我稱爲搜索的選項卡。然後我用名爲SearchController的XIB文件創建了一個UITableViewController。在MainWindows.xib中,我將第三個選項卡鏈接到XIB文件「SearchController」。無法在接口生成器中綁定UISearchBar
我爲UISearchBar創建了IBOutlet。在Interface Builder中,我加入的UISearchBar,當我跑的項目一切正常,但是當我試圖把的UISearchBar綁定到我的IBOutlet中,它提出了當我點擊「搜索」選項卡上的異常:
Terminating app due to uncaught exception 'NSUnknownKeyException', reason: '[<UITableViewController 0x4e3ee80> setValue:forUndefinedKey:]: this class is not key value coding-compliant for the key searchBar.'
*** Call stack at first throw:"