Rahul Sonvane
Rahul Sonvane

Reputation: 3897

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];

Upvotes: 6

Views: 3326

Answers (1)

Vasil Garov
Vasil Garov

Reputation: 4921

In Swift you can do it like this:

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

Upvotes: 14

Related Questions