我想抓住每一个onClick事件WKWebView.该网站仅使用JavaScript,所以我无法处理任何事情:
func webView(_ webView: WKWebView, decidePolicyFor navigationAction: WKNavigationAction, decisionHandler: @escaping (WKNavigationActionPolicy) -> Void)
Run Code Online (Sandbox Code Playgroud)
我怎样才能做到这一点?
我正在尝试搜索从JSON获得的字典数组中的值.我有一个tableViewController带UISearchResultsUpdating.我找到了一个包含字符串数组的示例:
func updateSearchResultsForSearchController(searchController: UISearchController)
{
filteredTableData.removeAll(keepCapacity: false)
let searchPredicate = NSPredicate(format: "SELF contains[c] %@", searchController.searchBar.text)
let array = tableData.filteredArrayUsingPredicate(searchPredicate)
filteredTableData = array as! [String]
self.tableView.reloadData()
}
Run Code Online (Sandbox Code Playgroud)
我真的不知道如何在数组中进行搜索:
(
{
id = 3;
name = TestNewYork;
},
{
id = 2;
name = TestLA;
},
{
id = 1;
name = TestWashington;
}
)
Run Code Online (Sandbox Code Playgroud)
我tableData = []也filteredTableData必须是一个阵列
请帮忙!
我需要更改UITableView Cell的" - "按钮颜色和删除按钮(按下" - "按钮后显示)图像.我在iOS中尝试了这个答案uitableview删除按钮图像但它在UITableView编辑模式下不起作用.请帮忙.