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 7171365
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 28, 20262026-05-28T15:24:02+00:00 2026-05-28T15:24:02+00:00

I am having trouble understanding how layering is performed within Xcode. I have a

  • 0

I am having trouble understanding how layering is performed within Xcode. I have a .xib with a view, that view has 6 UIImageView ‘s which each contain a different image. I have created IBOutlets for each of these so I can change the image at runtime.

I now want to change the order the UIImageViews are drawn at runtime, so imageA at the back is now drawn on top of everything else. How can I change the layer order? I originally tried removing all the subviews and using [self.view insertSubview: atIndex: ] to see if I could change the draw order that way but my code crashes.

Can anyone tell me the correct method for doing this please?

Thanks in advanced,
Elliott

  • 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-05-28T15:24:03+00:00Added an answer on May 28, 2026 at 3:24 pm

    i guess you are looking for these UIView methods:

    1:
    exchangeSubviewAtIndex:withSubviewAtIndex:
    Exchanges the subviews at the specified indices.

    - (void)exchangeSubviewAtIndex:(NSInteger)index1 withSubviewAtIndex:(NSInteger)index2
    

    2:
    bringSubviewToFront:
    Moves the specified subview so that it appears on top of its siblings.

    - (void)bringSubviewToFront:(UIView *)view
    

    3:
    sendSubviewToBack:
    Moves the specified subview so that it appears behind its siblings.

    - (void)sendSubviewToBack:(UIView *)view
    

    with these methods you can exchange the subviews order to get one UIView appear over one other in their superview… if that’s what you were asking….

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

Sidebar

Related Questions

I'm having trouble understanding why I have to place the button triggering the getJSON
I'm having trouble understanding coredata with my uitableview. I have rows being deleted and
from here Im having trouble understanding they say that ado.net does not include a
I'm having trouble understanding the following bit of code that I was hoping would
I'm having trouble understanding why Python raises a TypeError when you provide arguments that
I'm having trouble understanding the for/in statement in JavaScript. The book which I'm using
I'm having trouble understanding how to solve this issue, essentially I have two arrays
I've been having trouble understanding where exactly an annotation has to or can be
I am having trouble understanding how escaping works inside html tag attribute values that
I'm having trouble understanding why a WSDL would be so beneficial, when the truth

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.