Skip to content
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

[TIMOB-10001] iOS: adjust table row width for grouped table style #2611

Merged
merged 1 commit into from
Jul 20, 2012
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
10 changes: 10 additions & 0 deletions iphone/Classes/TiUILabelProxy.m
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,16 @@ -(CGFloat) verifyHeight:(CGFloat)suggestedHeight
return height;
}

-(NSArray *)keySequence
{
static NSArray *labelKeySequence = nil;
static dispatch_once_t onceToken;
dispatch_once(&onceToken, ^{
labelKeySequence = [[NSArray arrayWithObjects:@"font",nil] retain];
});
return labelKeySequence;
}

-(NSMutableDictionary*)langConversionTable
{
return [NSMutableDictionary dictionaryWithObject:@"text" forKey:@"textid"];
Expand Down
4 changes: 4 additions & 0 deletions iphone/Classes/TiUITableView.m
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@
#import "TiRootController.h"

#define DEFAULT_SECTION_HEADERFOOTER_HEIGHT 20.0
#define GROUPED_MARGIN_WIDTH 18.0

@interface TiUIView(eventHandler);
-(void)handleListenerRemovedWithEvent:(NSString *)event;
Expand Down Expand Up @@ -2114,6 +2115,9 @@ - (NSInteger)tableView:(UITableView *)ourTableView indentationLevelForRowAtIndex
-(CGFloat)computeRowWidth
{
CGFloat rowWidth = tableview.bounds.size.width;
if (self.tableView.style == UITableViewStyleGrouped) {
rowWidth -= GROUPED_MARGIN_WIDTH;
}

// Apple does not provide a good way to get information about the index sidebar size
// in the event that it exists - it silently resizes row content which is "flexible width"
Expand Down