Posts

Post marked as solved
1 Replies
137 Views
Hello! i was wondering how to add an if statement in an if statement. Here is my code: At the top: buttonPressed = true; Below override func if buttonPressed {         Text.isHidden = false;         buttonPressed = false;         print("Text is now visible!")                  print("button has been pressed 1 time!")              if buttonPressed { Text2.isHidden = false;         print("button has been pressed 2 times!")     } Thanks!
Posted Last updated
.
Post marked as solved
1 Replies
184 Views
I was wondering how i could have 2 functions work from 1 button. One would happen on the first time you click and second will happen the second time you click. in java something like this: if button pressed{ // Code if button pressed{ // Code } } or at least that's how I was taught in java. so I'm wondering how I could do that in swift. Thanks!
Posted Last updated
.
Post marked as solved
2 Replies
119 Views
hello! i was wondering how i can get a UItext invisible, but when a button is pressed, it will show up or be invisible.
Posted Last updated
.