我想通过单击按钮进入CameraViewController,然后拍摄qr代码.我一直收到这个错误感谢U所有的帮助我给每个ViewController它在Storyboard中的类型
import UIKit
class movieListViewController: UIViewController, UITableViewDelegate, UITableViewDataSource {
@IBOutlet weak var movieTableView: UITableView!
var movie:[Movie] = [Movie]()
var currentMovies:[Movie] = [Movie]()
var counter = 0
override func viewDidLoad() {
super.viewDidLoad()
movie = Helpers.downloadJson()
self.movieTableView.reloadData()
sort()
}
func sort() {
movie.sort(by: { $0.releaseYear < $1.releaseYear })
movieTableView.reloadData()
}
func tableView(_ tableView: UITableView, numberOfRowsInSection section: Int) -> Int {
return movie.count
}
func tableView(_ tableView: UITableView, cellForRowAt indexPath: IndexPath) -> UITableViewCell {
let cell = tableView.dequeueReusableCell(withIdentifier: "MovieCell") as! MovieCell
cell.createCell(movie: movie[indexPath.row]) …Run Code Online (Sandbox Code Playgroud)