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
review #1
base: master
Are you sure you want to change the base?
review #1
Conversation
-objectForKey instead of key value access
@@ -35,23 +35,24 @@ - (void)viewDidLoad | |||
{ | |||
[super viewDidLoad]; | |||
|
|||
ARTableViewData *tableViewData = [[ARTableViewData alloc] initWithSectionDataArray:@[[self sectionTitle]]]; | |||
ARTableViewData *tableViewData = [[ARTableViewData alloc] init]; |
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.
prefer the idea of having "all" of sections initialized in the same place, instead of one in the constructor and then add the other ones. More easy for the eye I guess
overall looks great! |
Christos |
ARCellData *cellData = [[ARCellData alloc] initWithIdentifier:NSStringFromClass([CellStyleValue1 class])]; | ||
[cellData setCellConfigurationBlock:^(CellStyleValue1 *cell) { | ||
//[cell setStyle:UITableViewCellStyleValue1]; | ||
cell.textLabel.text = @"Project"; | ||
cell.detailTextLabel.text = self.task[@"project"]; | ||
cell.detailTextLabel.text = [self.task objectForKey:@"project"]; |
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.
As you said in the mail, this fail cause project is an NSNumber (as returned by the JSON parser) and fails. You need to convert it to a string using NSNumber stringValue method that is:
cell.detailTextLabel.text = [[self.task objectForKey:@"project"] stringValue];
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.
ah yes let's stick to the new convention [], ignore my comment
-use GenericTableView [registerClass] that supports prev iOS versions
-objectForKey instead of key value access