Created
November 27, 2010 02:42
-
-
Save chrisntr/717504 to your computer and use it in GitHub Desktop.
Fix for Chapter 10, Example 5
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
UIImagePickerController picker; | |
public override void ViewDidLoad () | |
{ | |
base.ViewDidLoad (); | |
UIButton button = UIButton.FromType(UIButtonType.RoundedRect); | |
button.Frame = new RectangleF(0f, 30f, 320, 40f); | |
button.SetTitle("Select Image", UIControlState.Normal); | |
button.TouchUpInside += delegate(object sender, EventArgs e) { | |
picker = new UIImagePickerController(); | |
picker.Delegate = new MyImagePickerDelegate(this); | |
this.PresentModalViewController(picker, true); | |
}; | |
this.View.AddSubview(button); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment