以前にも同じ質問をしたのですが、やはり理解できていなかったようで、また質問したいと思います。
画像のように、UIContainerViewを使い、1Button,2Button,を押した時それぞれの画面に遷移するというプログラムを書いたのですが、動きません。
コードのチェックをお願いします。
import UIKit
class ViewController: UIViewController {
@IBOutlet weak var first: UIView! @IBOutlet weak var second: UIView! @IBAction func firstScene(_ sender: UIButton) { first.isHidden = false second.isHidden = true } @IBAction func secondScene(_ sender: UIButton) { first.isHidden = true second.isHidden = false } override func viewDidLoad() { super.viewDidLoad() blueView.isHidden = false redView.isHidden = true // Do any additional setup after loading the view, typically from a nib. } override func didReceiveMemoryWarning() { super.didReceiveMemoryWarning() // Dispose of any resources that can be recreated. }
}
回答2件
あなたの回答
tips
プレビュー
バッドをするには、ログインかつ
こちらの条件を満たす必要があります。
2017/03/26 09:15