Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

insertSubview belowSubview in swift?

Tags:

ios

swift

I don't want just the syntax because I've already got it from apple's developer site and I don't know what but I'm doing something wrong. What I need is an actual calling of this function.

Can anyone tell me how to write below Obj-C code in swift?

[self.view insertSubview:VC1.view belowSubview: VC2.view];
like image 442
Rahul Sonvane Avatar asked Apr 30 '15 13:04

Rahul Sonvane


1 Answers

In Swift you can do it like this:

self.view.insertSubview(VC1.view, belowSubview: VC2.view)
like image 187
Vasil Garov Avatar answered Nov 09 '22 12:11

Vasil Garov