我試圖在swift中使用名爲MZFormSheetController的控件。在給出的例子中,它提供了一個屬性作爲完成處理程序,如果我理解正確,但我在Swift中翻譯它時遇到困難。任何幫助,將不勝感激。swift中屬性的完成處理程序
這是在obj-c示例中。
controller.didPresentContentViewControllerHandler = ^(UIViewController *content) {
NSLog(@"DID PRESENT");
[self setNeedsStatusBarAppearanceUpdate];
};
我嘗試了許多變化,做了在網絡廣泛的搜索,但我找不到任何可以幫助我,所以我在這裏停留
controller.didPresentContentViewControllerHandler = (content:UIViewController() ->() {
println("did present1")
})
下面是相關文檔:Cocoa Docs:: MZFormSheetPresentationController:: didPresentContentViewControllerHandler