인프런 커뮤니티 질문&답변
Type 'Any' has no subscript members 에러 때문에 컴파일 안 돼요 어떻게 해야 돼요?
해결된 질문
작성
·
333
0
func tableView(_ tableView: UITableView, numberOfRowsInSection section: Int) -> Int {
return datalist["weatherinfo"]!["local"]!!.count
! Type 'Any' has no subscript members
}
func tableView(_ tableView: UITableView, cellForRowAt indexPath: IndexPath) -> UITableViewCell {
let cell = tableView.dequeueReusableCell(withIdentifier: "Cell", for: indexPath) as! WeatherCell
// var dicTemp = datalist[indexPath.row]
let dicTemp = datalist["weatherinfo"]!["local"]!![indexPath.row]
! Type 'Any' has no subscript members
답변 1
1
뭐하는거니?
지식공유자
죄송한데 Xcode 버전이 달라서 그런거 같습니다.
Swift3가 적용된 Xcode를 사용하셔서 생기는 문제 입니다.
Swift3강좌에서 바뀐부분 다 적용해서 다시 만들었거든요.
Swift2 -> Swift3로 오면서 라이브 러리와 문법들이 조금 바뀌었습니다.
현재는 Swift3용 Xcode로 Swift2코드를 작성 하셔서 그렇습니다.





