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

Unified Diff: pkg/immi_samples/lib/ios/ImmiSamples/MenuPresenter.mm

Issue 2035023003: Remove service-compiler related code. (Closed) Base URL: git@github.com:dartino/sdk.git@master
Patch Set: Created 4 years, 6 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
Index: pkg/immi_samples/lib/ios/ImmiSamples/MenuPresenter.mm
diff --git a/pkg/immi_samples/lib/ios/ImmiSamples/MenuPresenter.mm b/pkg/immi_samples/lib/ios/ImmiSamples/MenuPresenter.mm
deleted file mode 100644
index c530c9fde12c5d92732978e4728725b2136bd45b..0000000000000000000000000000000000000000
--- a/pkg/immi_samples/lib/ios/ImmiSamples/MenuPresenter.mm
+++ /dev/null
@@ -1,81 +0,0 @@
-// Copyright (c) 2015, the Dartino project authors. Please see the AUTHORS file
-// for details. All rights reserved. Use of this source code is governed by a
-// BSD-style license that can be found in the LICENSE.md file.
-
-#import "MenuPresenter.h"
-
-@interface MenuPresenter ()
-
-@property (weak) MenuNode* root;
-@property UINavigationController* navigationController;
-
-@end
-
-@implementation MenuPresenter
-
-- (id)initWithCoder:(NSCoder*)aDecoder {
- self = [super initWithCoder:aDecoder];
- self.navigationController =
- [[UINavigationController alloc] initWithRootViewController:self];
- return self;
-}
-
-- (void)presentMenu:(MenuNode*)node {
- self.root = node;
- [self performSelectorOnMainThread:@selector(presentOnMainThread:)
- withObject:node
- waitUntilDone:NO];
-}
-
-- (void)presentOnMainThread:(MenuNode*)node {
- self.navigationController.title = node.title;
- [self.tableView reloadData];
-}
-
-- (void)patchMenu:(MenuPatch*)patch {
- [self performSelectorOnMainThread:@selector(patchOnMainThread:)
- withObject:patch
- waitUntilDone:NO];
-}
-
-- (void)patchOnMainThread:(MenuPatch*)patch {
- if (patch.title.changed) {
- self.navigationController.title = patch.title.current;
- }
- if (patch.items.changed) {
- // TODO(zerny): selectively reload only changed cells.
- [self.tableView reloadData];
- }
-}
-
-- (UIViewController *)viewController {
- return self.navigationController;
-}
-
-- (NSInteger)numberOfSectionsInTableView:(UITableView*)tableView {
- return 1;
-}
-
-- (NSInteger)tableView:(UITableView*)tableView
- numberOfRowsInSection:(NSInteger)section {
- assert(section == 0);
- return self.root.items.count;
-}
-
-- (UITableViewCell*)tableView:(UITableView*)tableView
- cellForRowAtIndexPath:(NSIndexPath*)indexPath {
- UITableViewCell* cell =
- [tableView dequeueReusableCellWithIdentifier:@"MenuItemPrototypeCell"
- forIndexPath:indexPath];
- MenuItemNode* item = self.root.items[indexPath.row];
- cell.textLabel.text = item.title;
- return cell;
-}
-
-- (void)tableView:(UITableView*)tableView
- didSelectRowAtIndexPath:(NSIndexPath*)indexPath {
- MenuItemNode* item = self.root.items[indexPath.row];
- item.select();
-}
-
-@end
« no previous file with comments | « pkg/immi_samples/lib/ios/ImmiSamples/MenuPresenter.h ('k') | pkg/immi_samples/lib/ios/ImmiSamples/SlidingWindowPresenter.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698