Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7997383
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 4, 20262026-06-04T14:57:20+00:00 2026-06-04T14:57:20+00:00

. Hello, In Interface builder it really easy to set the order of items,

  • 0

.

Hello,

In Interface builder it really easy to set the order of items, as in the layers by dragging them one above the other.

I am not being successful to replicate that in code.

What is the line I need to add to have a similar effect?

Cheers

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-04T14:57:21+00:00Added an answer on June 4, 2026 at 2:57 pm

    To quote another post, there are many useful methods for this exact purpose:

    @property(nonatomic,readonly) UIView *superview;
    @property(nonatomic,readonly,copy) NSArray *subviews;
    
    - (void)removeFromSuperview;
    - (void)insertSubview:(UIView *)view atIndex:(NSInteger)index;
    - (void)exchangeSubviewAtIndex:(NSInteger)index1 withSubviewAtIndex:(NSInteger)index2;
    
    - (void)addSubview:(UIView *)view;
    - (void)insertSubview:(UIView *)view belowSubview:(UIView *)siblingSubview;
    - (void)insertSubview:(UIView *)view aboveSubview:(UIView *)siblingSubview;
    
    - (void)bringSubviewToFront:(UIView *)view;
    - (void)sendSubviewToBack:(UIView *)view;
    

    Their names are fairly self explanatory. Of particular interest to you might be insertSubview:AtIndex, insertSubview:belowSubview (or above), as well as the bringSubviewToFront and sendSubviewToBack. These will allow you to build your view without having to add them in any specific order.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

If I have a large number of buttons set up in Interface Builder, how
Hello! I'm not even sure if this is possible, but hopefully it is in
I set up a project using MVC (to be more specific this is Hello
public @interface InnerAnnotation { String value() default hello; } public @interface OuterAnnotation { InnerAnnotation
Hello I have this problem with PyQt4-dev-tools that include: * a user interface compiler
while i create my UIButton on Interface builder, i put a text like Button
Hello i use this lightbox plugin for one of my website and i will
Hello friends I am developing application in which view has one textField & 2
I am not using a tab bar or any other control -- I want
http://stoccey.net/demo/images/templ.jpg Hello, the link is the layout of the interface I am planning to

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.