-
-
Notifications
You must be signed in to change notification settings - Fork 1.8k
Force LTR layout for FLEX debugging tool to maintain technical readability #723
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
base: master
Are you sure you want to change the base?
Changes from all commits
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 |
|---|---|---|
|
|
@@ -38,7 +38,8 @@ - (void)viewDidLoad { | |
| self.activatesSearchBarAutomatically = YES; | ||
| self.searchBarDebounceInterval = kFLEXDebounceInstant; | ||
| self.showsCarousel = YES; | ||
| self.carousel.items = @[@"A→Z", @"Count", @"Size"]; | ||
| // Use RTL-aware arrow that flips direction in Arabic/RTL layouts | ||
| self.carousel.items = @[@"A\u2192Z", @"Count", @"Size"]; | ||
|
Comment on lines
-41
to
+42
Collaborator
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. Does this mean the arrow will always point towards the Z? |
||
|
|
||
| self.refreshControl = [UIRefreshControl new]; | ||
| [self.refreshControl addTarget:self action:@selector(refreshControlDidRefresh:) forControlEvents:UIControlEventValueChanged]; | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -72,6 +72,15 @@ - (void)configureCell:(__kindof UITableViewCell *)cell forRow:(NSInteger)row { | |
| cell.accessoryType = UITableViewCellAccessoryDisclosureIndicator; | ||
| cell.textLabel.font = UIFont.flex_defaultTableCellFont; | ||
| cell.textLabel.text = self.rows[row].entryNameFuture(); | ||
|
|
||
| // Force LTR layout for FLEX table view cells | ||
| if (@available(iOS 9.0, *)) { | ||
| cell.semanticContentAttribute = UISemanticContentAttributeForceLeftToRight; | ||
| cell.contentView.semanticContentAttribute = UISemanticContentAttributeForceLeftToRight; | ||
| if (cell.textLabel) { | ||
| cell.textLabel.semanticContentAttribute = UISemanticContentAttributeForceLeftToRight; | ||
| } | ||
| } | ||
|
Comment on lines
+75
to
+83
Collaborator
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. I'm not familiar with these APIs, but are setting these attributes on the parent views/controllers not enough? Is text direction not inherited by subviews? I'm halfway through this PR and I notice it touches a TON of files. There has got to be a better way, even if it means using the objc runtime to hook every cell class at runtime to behave this way… |
||
| } | ||
|
|
||
| @end | ||
|
|
||
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.
I think FLEX's minimum supported target is iOS 9, is it not?