Skip to content

Instantly share code, notes, and snippets.

@chrisntr
Created November 27, 2010 02:42
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save chrisntr/717504 to your computer and use it in GitHub Desktop.
Save chrisntr/717504 to your computer and use it in GitHub Desktop.
Fix for Chapter 10, Example 5
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