Update the debug window on the main thread.
This commit is contained in:
1 parent
6ee1e28c16
commit
f667514d32
1 file changed
+5
-3
@@ -32,9 +32,11 @@
|
||||
}
|
||||
|
||||
- (void)log:(NSString *)string {
|
||||
NSAttributedString *attributedString = [[NSAttributedString alloc] initWithString:string];
|
||||
[[self.logView textStorage] appendAttributedString:attributedString];
|
||||
[attributedString release];
|
||||
dispatch_async(dispatch_get_main_queue(), ^{
|
||||
NSAttributedString *attributedString = [[NSAttributedString alloc] initWithString:string];
|
||||
[[self.logView textStorage] appendAttributedString:attributedString];
|
||||
[attributedString release];
|
||||
});
|
||||
}
|
||||
|
||||
- (IBAction)clearLog:(id)sender {
|
||||
|
||||
Reference in new issue
Block a user