Skip to content

Instantly share code, notes, and snippets.

@escoz
Created June 7, 2011 21:12
Show Gist options
  • Save escoz/1013179 to your computer and use it in GitHub Desktop.
Save escoz/1013179 to your computer and use it in GitHub Desktop.
ActionSheetView with delegate
using System;
using System.Drawing;
using System.Linq;
using MonoTouch.Foundation;
using MonoTouch.UIKit;
namespace Sample
{
public class ActionSheetView : UIActionSheet
{
public ActionSheetView(string title) :base(title)
{
Delegate = new ActionSheetDelegate();
this.AddButton("test");
}
public ActionSheetView(IntPtr handle) : base(handle)
{
}
public virtual void Cancel()
{
}
public virtual void Destroy()
{
}
[Model]
public class ActionSheetDelegate : UIActionSheetDelegate
{
public ActionSheetDelegate()
{
}
public override void WillPresent(UIActionSheet actionSheet)
{
}
public override void Presented (UIActionSheet actionSheet)
{
Console.WriteLine("presented");
}
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment