Skip to content

Instantly share code, notes, and snippets.

@halilozel1903
Created July 2, 2018 06:07
Show Gist options
  • Save halilozel1903/592ae386a1ddf0e5996b813dd777a06c to your computer and use it in GitHub Desktop.
Save halilozel1903/592ae386a1ddf0e5996b813dd777a06c to your computer and use it in GitHub Desktop.
@objc func changePic() { // resim ile ilgili işlemler için metod oluşturuldu.
if isFruit == true{ // eğer true ise
imageView.image = UIImage(named: "strawberry.jpg") // image değerini çilek yap
etFruit.text = "Strawberry" // text değerine çilek yaz
isFruit = false // isFruit değerini false yap
}else if isFruit == false{ // false ise
imageView.image = UIImage(named: "plum.jpg") // image değerini erik yap
etFruit.text = "Green Plum" // text değerine yeşil erik yaz
isFruit = true // isFruit değerini true yap
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment