Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

send subview to the back

I know of a function that brings a view to the front.

  [self.view bringSubviewToFront:myView];

I am wondering if there is a function that sends a subview to the back.

like image 277
SirRupertIII Avatar asked Sep 29 '12 01:09

SirRupertIII


People also ask

How do you send a view back in storyboard?

You can just select the view and then go to 'Editor > Arrange > Send to back' or drag the view in the document outline so to be the first subview of your controller's main view.


1 Answers

Try,

Objective C:

[self.view sendSubviewToBack: yourView];

Swift:

self.view.sendSubview(toBack: yourView)
like image 92
Krunal Avatar answered Oct 14 '22 08:10

Krunal