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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T05:58:34+00:00 2026-05-26T05:58:34+00:00

if (isGameOne == TRUE and isGameTwo == FALSE){ x.view.frame = xGraph->theGraph.frame; y.view.frame = yGraph->theGraph.frame;

  • 0
if (isGameOne == TRUE and isGameTwo == FALSE){
        x.view.frame = xGraph->theGraph.frame;
        y.view.frame = yGraph->theGraph.frame;
    } else {
        /*remove above frame here*/

    }

Above is my script i am working with. When isGameOne is true, i want it to attach x.view.frame to xGraph->theGraph.frame; And same for ‘y’, but this works fine.

What i am having an issue with is understanding how i would remove x.view.frame the frame if isGameOne is not true (false).
I am sure its probably something really easy to do, but i am still getting my hand dirty with objective-c. Sorry for my ignorance

Cheers

=========[ How to do this ]========

I actually have a button that quits game one, so inside the gameOne method i have

if (isGameOne == TRUE and isGameTwo == FALSE){
        x.view.frame = xGraph->theGraph.frame;
        y.view.frame = yGraph->theGraph.frame;

}

inside my quit button method i added:

isGameTwo = TRUE;
isGameOne = FALSE;
if (isGameOne == FALSE and isGameTwo == TRUE) {
    /* code to remove *DoodlePad from *Grap */
    [xDoodlePad.view setHidden:YES];
    [yDoodlePad.view setHidden:YES];

}
  • 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-26T05:58:35+00:00Added an answer on May 26, 2026 at 5:58 am

    It depends on what you are doing with those frames. If you want them to be moved to another location on the screen, you could predefine that frame elsewhere and assign it, or you could use CGRectMake to create a specific frame right there.

    If you are wanting to hide/show the views based on this condition, you should already have the appropriate frames set before the conditional and just call setHidden on the views with the appropriate argument.

    Note that CGRects are structs, so there is assignment of the value itself taking place. You are not maintaining a reference to the other frame.

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

Sidebar

Related Questions

Is it really necessary to use the 'extends BoardGame'? If I remove it my
What am I missing I cant figure it out by the way this is
I am trying to do the design of a Bejeweled game. I have basically
I'm making a game where the user plays against the computer. The computer opponent
@interface EAGLView1 : UIView<UIAlertViewDelegate> { @private /* The pixel dimensions of the backbuffer */
I'm having a very hard time understanding how to setup an object that allows
I have an error in my logic and am having trouble figuring out what
I want to know how many games my computer can play in 1000 ms.
I have an application which has questions. After answer all the questions, score will

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.