Closed kj-love-xj closed 5 years ago
请贴出具体代码
请贴出具体代码
使用的就是QMUICommonTableViewController,不知道与FDFullscreenPopGesture有没有关系
`override func viewDidLoad() { super.viewDidLoad() title = "邀请好友" // 显示搜索框 shouldShowSearchBar = true // 搜索框的颜色 searchBar.backgroundImage = UIImage(color: UIColor.white) // 返回按钮 useBackBarButtonItem() tableView.backgroundColor = UIColor(rgb: 0xF5F7F9) tableView.separatorStyle = .none searchController.tableView.backgroundColor = UIColor(rgb: 0xF5F7F9) searchController.tableView.separatorStyle = .none
tableView.register(JOINIMInviteUserViewCell.self, forCellReuseIdentifier: "JOINIMInviteUserViewCell")
searchController.tableView.register(JOINIMInviteUserViewCell.self, forCellReuseIdentifier: "JOINIMInviteUserViewCell")
if group_id == nil {
if group != nil {
group_id = group!.group_id
}
}
(btnConfirm.rx.tap)
.throttle(kjButtonActionSpace, latest: false, scheduler: MainScheduler.instance)
.subscribe(onNext: {
[weak self] in
// 确定邀请进群
self?.invite()
}).disposed(by: dispose)
// 获取好友列表
getUserFriends()
}`
下面是搜索的代码
`/// 搜索
override func searchController(_ searchController: QMUISearchController!, updateResultsForSearch searchString: String!) {
guard searchString.isEmpty == false else {
searchArray.removeAll()
searchController.tableView.reloadData()
return
}
let data = (dataArray as NSArray).filtered(using: NSPredicate(format: "name like[cd] '(searchString!)'"))
searchArray.removeAll()
if data.count > 0 {
searchArray.append(contentsOf: (data as! Array
override func willPresent(_ searchController: QMUISearchController!) {
setNeedsStatusBarAppearanceUpdate()
}
override func willDismiss(_ searchController: QMUISearchController!) {
setNeedsStatusBarAppearanceUpdate()
}`
看不出来是什么问题,可以尝试换种设置背景图的方式,例如 UISearchBar.m:388-389 的写法。
或者提供一份有问题的 Demo。
看不出来是什么问题,可以尝试换种设置背景图的方式,例如 UISearchBar.m:388-389 的写法。
或者提供一份有问题的 Demo。
找到问题了,是因为edgesForExtendedLayout = UIRectEdgeNone导致的。。
我也有这个问题,edgesForExtendedLayout 没有设置。。。
Bug 表现 问题的具体描述 搜索框进入编辑时,状态栏是一个黑色半透明遮罩,内容向上滑动时,内容会显示在状态栏上
截图 Bug 现场的界面截图,或者 Xcode 控制台的错误信息截图,有问题的代码截图
如何重现
预期的表现 正常情况下,应该是什么表现 正常情况下,搜索框应该盖住状态栏
其他信息