Getting the following error when i migrated my current Xcode (v 7.0.1) project to Xcode 7.1.1
Any idea how to resolve above errors?
My code is as follows
var arrOfRewardDetail : Array = [Dictionary<String, String>]()
func tableView(tableView: UITableView, numberOfRowsInSection section: Int) -> Int {
return arrOfRewardDetail.count //Ambiguous reference to member 'count'
}
if self.arrOfRewardDetail[indexPath.row]["KEY"] == "Promotion By : "{} // Cannot subscript a value of type 'Array'
Update Now getting the following errors
let indexOfEnum : Int = self.arrPromitionDetailEnum.indexOf(dictRewardInfo["r_promotion_detail_type"]!)!
let indexOfEnum : Int = self.arrPromitionDetailEnum.indexOf(dictInfo["r_promotion_detail_type"]!)! // Cannot subscript a value of type 'Array'
Just remove the : Array
part:
var arrOfRewardDetail = [Dictionary<String, String>]()
The compiler will infer the right type, which is [Dictionary<String, String>]
, not just Array
.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With