在重新访问一些似乎与Xcode6一起使用的代码时,我注意到我得到了一个&#34; NSArray is not convertible to Array<Row>' to type 'NSArray'
&#34;这一行的错误:
var array = (data as NSArray).filteredArrayUsingPredicate(searchpredicte!) as? [AnyObject]
这是代码
func updateSearchResultsForSearchController(searchController: UISearchController) {
data1.removeAll(keepCapacity: false)
var searchpredicte = NSPredicate(format: "SELF CONTAINS[c] %@", serchcontroller.searchBar.text)
var array = (data as NSArray).filteredArrayUsingPredicate(searchpredicte!) as? [AnyObject]
// error above 1 line
data1 = array as Array<Row>
self.table.reloadData()
}