Questions tagged [mainrunloop]

2 questions
2
votes
1 answer

Swift cannot output when using NSTimer

I tried output to STDOUT every second by using NSTimer. I wrote the following code and saved it as sample.swift. #!/usr/bin/swift import AppKit class Foo : NSObject { override init() { super.init() …
0
votes
1 answer

iOS - NSRunLoop mainRunLoop use

- (void) myFunction { User *user = [[User alloc] init]; user.property = @"value"; [user login:@"username" password:@"pwd" delegate:nil]; while (NO == user.runLoopEnd) { [[NSRunLoop mainRunLoop] runMode:NSDefaultRunLoopMode…
Jayprakash Dubey
  • 35,723
  • 18
  • 170
  • 177