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

review #1

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open

review #1

wants to merge 2 commits into from

Conversation

cvasilak
Copy link

@cvasilak cvasilak commented Jun 3, 2013

-use GenericTableView [registerClass] that supports prev iOS versions
-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];
Copy link
Author

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

@cvasilak
Copy link
Author

cvasilak commented Jun 3, 2013

overall looks great!

@corinnekrych
Copy link
Owner

Christos
Do you prefer to use objectForKey method on NSdictionary rather than [] notation for latest ios compiler support

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"];
Copy link
Author

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];

Copy link
Author

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants