flutter_flutter/shell/ios/sky_view_controller.mm
Adam Barth c8e5668ddb Refactor SkyShell to allow multiple SkyViews
This CL separates the view-specific state from the process-global state. The
view-specific state now lives on Instance rather than Shell.

R=eseidel@chromium.org

Review URL: https://codereview.chromium.org/1187503003.
2015-06-12 13:29:53 -07:00

29 lines
688 B
Plaintext

// Copyright 2015 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#import "sky_view_controller.h"
#import "sky_surface.h"
#import <UIKit/UIKit.h>
#import <QuartzCore/QuartzCore.h>
#include "sky/shell/shell_view.h"
@implementation SkyViewController
- (void)loadView {
ShellView* shell_view = new sky::shell::ShellView(sky::shell::Shell::Shared());
SkySurface* surface = [[SkySurface alloc] initWithShellView: shell_view];
surface.autoresizingMask =
UIViewAutoresizingFlexibleWidth | UIViewAutoresizingFlexibleHeight;
self.view = surface;
[surface release];
}
@end