Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(278)

Unified Diff: ios/showcase/suggestions/sc_suggestions_coordinator.mm

Issue 2619963004: Suggestions UI - Add Data Source and Item (Closed)
Patch Set: Change to property Created 3 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « ios/chrome/browser/ui/suggestions/suggestions_view_controller.mm ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ios/showcase/suggestions/sc_suggestions_coordinator.mm
diff --git a/ios/showcase/suggestions/sc_suggestions_coordinator.mm b/ios/showcase/suggestions/sc_suggestions_coordinator.mm
index 12f4deaaf98ea40478b19cf8bda6f52c7170a717..707363d602dcf5e37b6413f983caae5e9def2b80 100644
--- a/ios/showcase/suggestions/sc_suggestions_coordinator.mm
+++ b/ios/showcase/suggestions/sc_suggestions_coordinator.mm
@@ -13,26 +13,34 @@
@interface SCSuggestionsCoordinator ()<SuggestionsCommands>
+@property(nonatomic, strong)
+ SuggestionsViewController* suggestionViewController;
+
@end
@implementation SCSuggestionsCoordinator
@synthesize baseViewController;
+@synthesize suggestionViewController = _suggestionViewController;
#pragma mark - Coordinator
- (void)start {
- SuggestionsViewController* suggestion = [[SuggestionsViewController alloc]
+ _suggestionViewController = [[SuggestionsViewController alloc]
initWithStyle:CollectionViewControllerStyleDefault];
- suggestion.suggestionCommandHandler = self;
+ _suggestionViewController.suggestionCommandHandler = self;
- [self.baseViewController pushViewController:suggestion animated:YES];
+ [self.baseViewController pushViewController:_suggestionViewController
+ animated:YES];
}
#pragma mark - SuggestionsCommands
- (void)addEmptyItem {
+ [self.suggestionViewController addTextItem:@"Button clicked"
+ subtitle:@"Item Added!"
+ toSection:5];
}
@end
« no previous file with comments | « ios/chrome/browser/ui/suggestions/suggestions_view_controller.mm ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698