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

final #32

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

final #32

wants to merge 1 commit into from

Conversation

bblanco1
Copy link

No description provided.


@interface DetailTableViewController : UITableViewController

@property(nonatomic)CQCategory *category;

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Style: there should be a space between the property attributes and the type

@property(nonatomic) CQCategory *category;
//                  ^

@cspickert
Copy link

Looks great overall! I think this is the right architecture. Style-wise, make sure to keep your vertical and horizontal spacing consistent, and think about removing the default/empty method implementations.

}

- (void)viewDidAppear:(BOOL)animated {
[self.tableView reloadData];

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Two comments here. First, when you're overriding methods like viewDidLoad or viewDidAppear:, you should always call the super implementation first:

[super viewDidAppear:animated];
//...

That way, you'll run the code in the superclass's implementation of this method, and then your code.

Second, you probably noticed that after you select an option in the detail view and then go back, there's a delay before any changes are reflected in the master table view. If you wanted the change to be more instantaneous, you could create a delegate property on your detail view controller and set it to self when preparing to segue from the master to the detail controller, and send a message to the master controller whenever an option was selected indicating that it should reload its table view.

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.

2 participants