-
Notifications
You must be signed in to change notification settings - Fork 4.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[mono] iOS Test runner #34976
[mono] iOS Test runner #34976
Changes from all commits
f9a926e
4f0100e
07bc7cd
7148281
625b9cc
fadf3e5
7b30a9c
15a4e65
b04617b
7af4801
780b1fb
2a5f6bf
2a61ec9
487d9d0
c26cf8b
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -34,7 +34,7 @@ - (void)viewDidLoad { | |
|
||
CGRect applicationFrame = [[UIScreen mainScreen] applicationFrame]; | ||
logLabel = [[UITextView alloc] initWithFrame: | ||
CGRectMake(2.0, 50.0, applicationFrame.size.width, applicationFrame.size.height)]; | ||
CGRectMake(2.0, 50.0, applicationFrame.size.width - 2.0, applicationFrame.size.height - 50.0)]; | ||
logLabel.font = [UIFont systemFontOfSize:9.0]; | ||
logLabel.backgroundColor = [UIColor blackColor]; | ||
logLabel.textColor = [UIColor greenColor]; | ||
|
@@ -43,7 +43,7 @@ - (void)viewDidLoad { | |
logLabel.editable = NO; | ||
logLabel.clipsToBounds = YES; | ||
|
||
summaryLabel = [[UILabel alloc] initWithFrame: CGRectMake(10.0, 0.0, applicationFrame.size.width, 50)]; | ||
summaryLabel = [[UILabel alloc] initWithFrame: CGRectMake(10.0, 0.0, applicationFrame.size.width - 10.0, 50)]; | ||
summaryLabel.textColor = [UIColor whiteColor]; | ||
summaryLabel.font = [UIFont boldSystemFontOfSize: 14]; | ||
summaryLabel.numberOfLines = 2; | ||
|
@@ -80,9 +80,10 @@ - (void)viewDidLoad { | |
NSString* nsstr = [NSString stringWithUTF8String:strdup(value)]; | ||
dispatch_async(dispatch_get_main_queue(), ^{ | ||
logLabel.text = [logLabel.text stringByAppendingString:nsstr]; | ||
dispatch_async(dispatch_get_main_queue(), ^{ | ||
[logLabel scrollRangeToVisible: NSMakeRange(logLabel.text.length -1, 1)]; | ||
}); | ||
CGRect caretRect = [logLabel caretRectForPosition:logLabel.endOfDocument]; | ||
[logLabel scrollRectToVisible:caretRect animated:NO]; | ||
[logLabel setScrollEnabled:NO]; | ||
[logLabel setScrollEnabled:YES]; | ||
}); | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Some hack to automatically scroll to the bottom in UITextView There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. why do you need to toggle setScrollEnabled? is the scrollRectToVisible not enough? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @akoeplinger I don't know but without it doesn't work properly, I tried different hacks from SO this one works as expected (https://stackoverflow.com/questions/19124037/scroll-to-bottom-of-uitextview-erratic-in-ios-7/20989956#20989956) |
||
} | ||
|
||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What does
""!
achieve here? Is this the "null-forgiving" operator?There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
These properties are guaranteed to be non-null always (due to
[Required]
attribute) the compiler forces me to do inline init to leave them non-nullable. I wonder how @stephentoub solves such cases.