For example, to handle UIKeyboard.WillShowNotification, I have to call UIKeyboard.Notifications.ObserveWillShow, and manually wrap a function in an EventHandler:
UIKeyboard.Notifications.ObserveWillShow(EventHandler<_>(fun sender args ->
doSomething args))
When I would expect to be able to just do this:
UIKeyboard.WillShow.Add(doSomething)
To allow this, I added a static event to UIKeyboard:
module UIKeyboardNotifications =
let WillShow = Event<_>()
UIKeyboard.Notifications.ObserveWillShow(EventHandler<_>(fun sender args -> WillShow.Trigger(args)))
type UIKeyboard with
static member WillShow = UIKeyboardNotifications.WillShow.Publish
But this should be part of MonoTouch.dll.
For example, to handle
UIKeyboard.WillShowNotification, I have to callUIKeyboard.Notifications.ObserveWillShow, and manually wrap a function in anEventHandler:When I would expect to be able to just do this:
To allow this, I added a static event to
UIKeyboard:But this should be part of
MonoTouch.dll.