iOSbuddy iOSbuddy - 1 year ago 246
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];

Answer Source

In Swift you can do it like this:

self.view.insertSubview(VC1.view, belowSubview: VC2.view)
Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download