iOSbuddy iOSbuddy - 2 months ago 35x
Swift Question

insertSubview belowSubview in 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];


In Swift you can do it like this:

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