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
@IBAction func btnClicked(_ sender: Any) { | |
// Alert ile ilgili işlemler yapılacak. | |
} |
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
@IBAction func btnClicked(_ sender: Any) { | |
// alert dialog ile ilgili ayarlar yapıldı. | |
let alert = UIAlertController(title: "Alert", message: "Very critical alert", preferredStyle: .alert) | |
let okButton = UIAlertAction(title: "OK", style: .cancel, handler: nil) // tamam butonu tanımı | |
alert.addAction(okButton) // action eklendi. | |
// yapıları görüntülemede kullanılır. | |
self.present(alert, animated: true, completion: nil) // completion : işlem sonrası birşeyler yapılacak mı ? | |
} |
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
@IBAction func signClicked(_ sender: Any) { | |
} |
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
@IBOutlet weak var usernameTxt: UITextField! | |
@IBOutlet weak var passwordTxt: UITextField! | |
@IBOutlet weak var passwordAgainTxt: UITextField! |
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
if usernameTxt.text == "" && passwordTxt.text == "" { | |
let alert = UIAlertController(title: "Alert", message: "Username and Password is empty", preferredStyle: .alert) | |
let okButton = UIAlertAction(title: "OK", style: .cancel, handler: nil) | |
alert.addAction(okButton) | |
self.present(alert, animated: true, completion: nil) | |
} | |
else if passwordTxt.text == ""{ | |
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
@IBAction func changeClicked(_ sender: Any) { | |
} |
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
var number = 0 // number adında bir degisken tanımlandı. | |
@IBOutlet weak var image: UIImageView! // image tanımlandı. |
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
@IBAction func changeClicked(_ sender: Any) { | |
if number == 0 { | |
image.image = UIImage(named: "tr.png") | |
number = number + 1 | |
}else if number == 1{ | |
image.image = UIImage(named: "az.gif") | |
number = number - 1 | |
} |
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
@IBOutlet weak var imageView: UIImageView! // image view tanım | |
@IBOutlet weak var etFruit: UILabel! // label tanımı |
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
override func viewDidLoad() { | |
super.viewDidLoad() | |
imageView.isUserInteractionEnabled = true // tıklanabilirlik özelliği eklendi. | |
let gestureRecognizer = UITapGestureRecognizer(target: self, action: #selector(ViewController.changePic)) | |
imageView.addGestureRecognizer(gestureRecognizer) // Ekrana yapılan dokunmaları takip eden metoddur. | |
} |
OlderNewer