This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import UIKit | |
class SecondViewController: UIViewController { | |
let divisionsName: [String] = ["東京都", "神奈川県", "埼玉県", "千葉県"] | |
var divisionButton: UIButton! | |
override func viewDidLoad() { | |
super.viewDidLoad() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import UIKit | |
@UIApplicationMain | |
class AppDelegate: UIResponder, UIApplicationDelegate { | |
var window: UIWindow? | |
// 共通のスライダー値 | |
var sliderValue: Float = 0.0 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import UIKit | |
class AdditionViewController: UIViewController { | |
@IBOutlet weak var target1Text: UITextField! | |
@IBOutlet weak var target2Text: UITextField! | |
@IBOutlet weak var resultLabel: UILabel! | |
override func viewDidLoad() { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import UIKit | |
class ViewController: UIViewController { | |
@IBOutlet weak var targetCountLabel: UILabel! | |
@IBOutlet weak var answerCountSlider: UISlider! | |
override func viewDidLoad() { | |
super.viewDidLoad() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import UIKit | |
class ViewController: UIViewController { | |
@IBOutlet weak var target1Text: UITextField! | |
@IBOutlet weak var target2Text: UITextField! | |
@IBOutlet weak var resultLabel: UILabel! | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import UIKit | |
class ViewController: UIViewController { | |
@IBOutlet weak var targetTextField: UITextField! | |
@IBOutlet weak var resultLabel: UILabel! | |
var resultCount: Int = 0 | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import UIKit | |
class ViewController: UIViewController { | |
@IBOutlet weak var target1TextField: UITextField! | |
@IBOutlet weak var target2TextField: UITextField! | |
@IBOutlet weak var target1Label: UILabel! | |
@IBOutlet weak var target2Label: UILabel! | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import UIKit | |
enum CalculationEnum: Int { | |
case PLUS | |
case MINUS | |
case TIMES | |
case DIVIDE | |
func calculate(target1: Double, target2: Double) -> Double { | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import UIKit | |
class ViewController: UIViewController { | |
// textFieldCollection | |
// 足し算アプリのため、テキストフィールドの順序は保証しなくて良い | |
@IBOutlet var numberTextFieldCollection: [UITextField]! | |
// 結果を表示するラベル | |
@IBOutlet weak var resultLabel: UILabel! |