2016-02-04 37 views
0

我有一個UIViewController(A),它使用NSObject和委託方法以編程方式顯示UITableView。這很好。從NSObject中的didSelectRowAtIndexPath在UIViewController中調用方法

但是當我選擇一行時,我想加載一個不同的UIViewController(B)。我試圖在didSelectRowAtIndexPath中調用的UIViewController(A)上使用NSNotification。然而,這需要大約20秒來加載UIViewController(B)。

注意:我知道UIViewController(B)在加載方面沒有問題。

我已檢查顯示UIViewController(B)在主線程上。它是什麼。

因此,我認爲可能有一個替代方法來顯示UIViewController(B)。我在想的另一種方法是在UIViewController(A)中編寫一個方法來呈現UIViewController(B)。但我怎麼能從NSObject didSelectRowAtIndexPath方法調用這個。

回答

相關問題