Skip to content

Commit

Permalink
Put our view into a UIScrollView
Browse files Browse the repository at this point in the history
  • Loading branch information
anaisbetts committed Jul 9, 2012
1 parent 8262dbb commit e599840
Showing 1 changed file with 10 additions and 3 deletions.
13 changes: 10 additions & 3 deletions Hypnosister/Hypnosister/AppDelegate.cs
Expand Up @@ -28,9 +28,16 @@ public override bool FinishedLaunching (UIApplication app, NSDictionary options)
// create a new window instance based on the screen size
window = new UIWindow (UIScreen.MainScreen.Bounds);

var view = new HypnosisView() { Frame = window.Bounds };
window.AddSubview(view);
view.BecomeFirstResponder();
var scrollView = new UIScrollView(window.Bounds);
window.AddSubview(scrollView);

var bigBounds = new RectangleF(0.0f, 0.0f, window.Bounds.Width * 2.0f, window.Bounds.Height * 2.0f);
var bigView = new HypnosisView() { Frame = bigBounds };

scrollView.AddSubview(bigView);
scrollView.ContentSize = bigBounds.Size;

bigView.BecomeFirstResponder();

window.BackgroundColor = UIColor.White;

Expand Down

0 comments on commit e599840

Please sign in to comment.