0
我正在使用swreveal來做滑動菜單,我想在其中添加搜索欄。但是,搜索欄已被父視圖覆蓋。無法編輯`UITableViewController`中的搜索欄寬度和x座標
slide_areaWidth = self.revealViewController().rightViewRevealWidth
searchBar = UISearchBar(frame: CGRectMake(300, 0, 60, 64))
var searchDisplayController: UISearchDisplayController = UISearchDisplayController()
searchDisplayController = UISearchDisplayController(searchBar: searchBar, contentsController: self)
//searchDisplayController.delegate = self
searchDisplayController.searchResultsDataSource = self
self.tableView.tableHeaderView = searchBar
self.tableView.tableHeaderView!.frame = CGRectMake(300, 0, 60, 64);
在這裏添加搜索框使用**窗口位置** + x,否則使用'SWLRevel'的委託方法** - (void)revealController:(SWRevealViewController *)revealController didMoveToPosition :(FrontViewPosition)position ** –
對不起,我沒有依據窗口位置+ x。你的意思是UIScreen?非常感謝您 –
我發現編輯'self.revealViewController()。rightViewRevealOverdraw'的解決方案爲0。非常感謝您的幫助 –