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