Why does this loop freeze the GUI? How can I solve this?
-(void)freeze {
for(int i=0; i<10000; i++) {
NSLog(@"write!");
}
}
If I call this loop with IBAction (button), button and all app freeze on pressing it. After the loop is done, everything works fine again. What should I do?
Change method to
Now call it like this: