0
我想實例化一個新的ViewController與PushViewController一起使用並訂閱事件。但是,當我這樣做時,我得到一個錯誤,說我需要傳遞一個「IntPtr」參數。這是怎麼回事?實例化新的ViewController Xamarin iOS
更新:讀 「mystoryPage」 而不是 「storyController」。
我想實例化一個新的ViewController與PushViewController一起使用並訂閱事件。但是,當我這樣做時,我得到一個錯誤,說我需要傳遞一個「IntPtr」參數。這是怎麼回事?實例化新的ViewController Xamarin iOS
更新:讀 「mystoryPage」 而不是 「storyController」。
如果你的UIViewController從情節提要/廈門國際銀行的到來,加上默認構造函數您storyPageScroll
類調用基initWithNibName:bundle:
構造:
public storyPageScroll() : base("storyPageController", null)
{
}
用法:
var storyController = new storyPageScroll();
否則增加一個基地構造函數,它調用init
構造函數:
public storyPageScroll() : base (NSObjectFlag.Empty)
{
}
你的第一個解決方案給我兩個錯誤,1.該方法沒有返回類型,2.意外字符':'。 –
我更新了它以匹配你的'storyPageScroll'類名 – SushiHangover
對不起。我犯了一個錯誤。現在沒有錯誤。 –