Add static helper, although generics are not supported in TP's
This commit is contained in:
Родитель
ccf9a38155
Коммит
d9f62074fb
|
@ -6,6 +6,13 @@ open MonoTouch.UIKit
|
|||
open MonoTouch.Foundation
|
||||
open MonoTouch.Design
|
||||
|
||||
type StaticHelpers() =
|
||||
static member InstantiateInitialViewController<'a when 'a :> NSObject>( storyboardName) =
|
||||
let mainStoryboard = UIStoryboard.FromName (storyboardName, null)
|
||||
let sb = mainStoryboard.InstantiateInitialViewController ()
|
||||
let theType = sb.GetType()
|
||||
sb :?> 'a
|
||||
|
||||
|
||||
module TypeSystem =
|
||||
let typeMap =
|
||||
|
|
Загрузка…
Ссылка в новой задаче