我正在使用 Brian Advent 的视频,使用 UIBlur 效果 ( https://www.youtube.com/watch?v=qaLiZgUK2T0 ) 制作模糊的侧边栏。然而,在他的视频中,他并没有解释如何将表格的每一项链接到一个单独的 View Controller 上——他只解释了如何让单个 View Controller 变红。有人可以向我解释如何做到这一点吗?相关代码如下:
func sideBarDidSelectButtonAtIndex(index: Int) {
if index == 0{
imageView.backgroundColor = UIColor.whiteColor()
imageView.image = nil
} else if index == 1{
imageView.backgroundColor = UIColor.clearColor()
imageView.image = UIImage(named: "image2")
}
}