-2
@IBAction func hallOfFame(_ sender: UIButton) {
guard let hof = self.storyboard?.instantiateViewController(withIdentifier: "HOF") as? HallOfFameTableViewController else { return }
hof.hallOfFames = self.hallOfFames.sorted(by: <)
}
셀프 뷰에는 hallOfFame이 있으며 Array입니다. 그리고 hof-view에는 hallOfFame도 있습니다. 그래서 자기 전당을 보냅니다 .Of-> 시야가 어떻게 됐는지. 이지만 hof-view는 데이터를 수신하지 않습니다. 무엇이 잘못 되었나요?다른 ViewController에 데이터를 전달하는 방법은 무엇입니까?
들개에 대해 들었어? https://developer.apple.com/library/content/featuredarticles/ViewControllerPGforiPhoneOS/UsingSegues.html – OhadM
segue 또는 대리인 방법을 통해 데이터를 전달할 수 있습니다. –
죄송합니다. selfVC & hofVC 연결된 내비게이션 컨트롤러 – usinuniverse