所以我一直在研究这个应用程序。我将信息从列表传递到这个"显示练习"查看信息将加载的位置。
列表1:
当我点击它时,它会将我发送到分段视图所在的显示练习视图
显示练习视图:
我在这里使用视图,当我为它们分配类时,或者如果我分配类" ShowExerciseViewController"这是我在
上遇到错误的主要类别VideoContainer.hidden = false .....
我试图评论他们我们并且它的工作比我连接所有东西并尝试为它分配值它停止并告诉我它的零。 这是代码:
import UIKit
class ShowExerciseViewController:UIViewController {
@IBOutlet var VideoContainer: UIView!
@IBOutlet var MusclesContainer: UIView!
@IBOutlet var InstructionsContainer: UIView!
@IBOutlet var holder_description: UITextView!
var _id_:String = ""
var _Decider = Decider()
override func viewDidLoad() {
super.viewDidLoad()
VideoContainer.hidden = false
MusclesContainer.hidden = true
InstructionsContainer.hidden = true
self.title = _Decider.name_decider(_id_)
//holder_description.text = "Placeholder"
//print(_Decider.description_decider(_id_))
// Do any additional setup after loading the view.
}
override func didReceiveMemoryWarning() {
super.didReceiveMemoryWarning()
// Dispose of any resources that can be recreated.
}
@IBAction func segmentControllerAction(sender: AnyObject) {
switch sender.selectedSegmentIndex{
case 0:
VideoContainer.hidden = false
MusclesContainer.hidden = true
InstructionsContainer.hidden = true
break
case 1:
MusclesContainer.hidden = false
VideoContainer.hidden = true
InstructionsContainer.hidden = true
break
case 2:
InstructionsContainer.hidden = false
MusclesContainer.hidden = true
VideoContainer.hidden = true
break
default:
break
}
}
}
这是故事板: