Welcome to the Treehouse Community
Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.
Looking to learn something new?
Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.
Start your free trial
Ivan Rzhanoi
16,596 PointsXcode: prevent auto run
Hello,
How could I prevent Xcode from automating running of my code. For example:
var x = 1
while(x<24){
print("a")
}
I am going to increment the x after printing "a", but before I am able to type x++ the Xcode runs my playground automatically.
For the loop demonstrated above auto running is fine, but when I have some complex loops that call functions with loops that have also some loops inside them my system starts to chug or Xcode crashes.
So what should I change, so the code would be run by the press of the button.