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

  • Home
  • SEARCH
  • 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 634591
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 13, 20262026-05-13T20:18:44+00:00 2026-05-13T20:18:44+00:00

In my application, I want to find out wheather an image is over another

  • 0

In my application, I want to find out wheather an image is over another image, and if it is then I have to swap that image with other i.e. bring the below rendered image on the front. For this, I’m writing below code :

 CGRect rect_1=CGRectMake(rect1X, rect1Y, rectW, rectH);
 CGRect rect_2=CGRectMake(rect2X, rect2Y, rectW2, rectH2);
 if(CGRectIntersectsRect(rect_1, rect_2))
 {
    [ravanImage bringSubviewToFront:ravanImage1];
 }

in which if ravanImage is over ravanImage1 then ravanImage1 should come above.
But this’ not working. Whereas it’s detecting wheather a rect is over other or not correctly, it’s not bringing the view to front.

Can anybody help me?
Thanx in advance.

  • 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-13T20:18:44+00:00Added an answer on May 13, 2026 at 8:18 pm

    Create UIImageView objects out of your ravanImage and ravanImage1 and add them to a holder view – A dummy UIView instance. Add this holder view as the subview of window or another view, whichever applicable.

    Next, use the bringSubviewToFront api on the holder view if you want to bring ravanImage1 front.

    .
    .
    .
    [holderView addSubview: ravanImage];
    [holderView addSubview: ravanImage1];
    .
    .
    .
    if (...your_condition...)
    {
        [holderView bringSubviewToFront: ravanImage1];
    }
    

    I am perplexed by the name “ravanImage” though! What does it mean, Ram Ravan?

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

Sidebar

Related Questions

I am doing one application.In that i want to find out the latitude and
Iam doing one application .In that i want to find out the x,y,z axis
iam developing one application.In that i want to find out the x,y,z axis values
I want to find out current location when the Application is running in background
I am developing an application. In it I want to find out the number
I work on a application where i want to find out which files on
I want to find out the type of the data that i am sending
If I have a point in latitude/longitude and I want to find out if
I want to find out the GPS status, when I launch the application. For
I want to find some Application that could tell me some statistics information about

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.