2015-04-30 23 views
4

我不想只是語法,因爲我已經從蘋果的開發者網站得到它,我不知道什麼,但我做錯了什麼。我需要的是這個函數的實際調用。insertSubview下面在swift中查看?

誰能告訴我如何在Obj-C代碼下寫下swift

[self.view insertSubview:VC1.view belowSubview: VC2.view]; 

回答

10

在斯威夫特,你可以做這樣的:

self.view.insertSubview(VC1.view, belowSubview: VC2.view) 
+0

太感謝你了,它的工作就像一個魅力:) – iOSbuddy

+0

很高興聽到這個。乾杯。 –