NSArray不能转换为Array <row> </row>

时间:2015-03-17 12:57:41

标签: swift

在重新访问一些似乎与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()
}

0 个答案:

没有答案