Skip to content

Instantly share code, notes, and snippets.

View halilozel1903's full-sized avatar
🦅
The rest of the world was black and white 🖤 🤍

Halil Özel halilozel1903

🦅
The rest of the world was black and white 🖤 🤍
View GitHub Profile
func greet(name: String, day: String) -> String {
return "Hello \(name), today is \(day)."
}
greet("Halil", "Saturday")
fun greet(name: String, day: String): String {
return "Hello $name, today is $day."
}
greet("Halil", "Saturday"
class Shape {
var numberOfSides = 0
func simpleDescription() -> String {
return "A shape with \(numberOfSides) sides."
}
}
class Shape {
var numberOfSides = 0
fun simpleDescription() =
"A shape with $numberOfSides sides."
}
var shape = Shape()
shape.numberOfSides = 7
var shapeDescription = shape.simpleDescription()
var shape = Shape()
shape.numberOfSides = 7
var shapeDescription = shape.simpleDescription()
override func touchesBegan(_ touches: Set<UITouch>, with event: UIEvent?) {
self.view.endEditing(true)
}
func textFieldShouldReturn(_ textField: UITextField) -> Bool {
if textField.tag == 1{
print("ad text field'i kapandı.")
}else if textField.tag == 2{
print("soyad text field'i kapandı.")
}else{
print("email text field'i kapandı.")
}
@IBOutlet weak var webImage: UIImageView!
if let url = URL(string: "https://i.pinimg.com/474x/a4/86/4d/a4864dcae5ab30a382e30e30f23a9440.jpg"){}