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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 10, 20262026-06-10T14:23:12+00:00 2026-06-10T14:23:12+00:00

I am developing my first game for iPhone and having this issue. The coordinate

  • 0

I am developing my first game for iPhone and having this issue. The coordinate system seems to be way off, most likely I am doing something wrong.

I have a UIViewController, and it’s set as a RootViewController. The viewController calls a UIView after that;

App delegate;

self.window = [[UIWindow alloc] initWithFrame:[[UIScreen mainScreen] bounds]];
MyViewController *myViewController = [[MyViewController alloc] init];
[[self window] setRootViewController:myViewController];

ViewController;

CGRect frame = [[UIScreen mainScreen] bounds];
MyView *v = [[MyView alloc] initWithFrame:frame];
[self setView:v];

View;

- (id)initWithFrame:(CGRect)frame
{
    self = [super initWithFrame:frame];
.
.
.
[myCALayer setBounds:CGRectMake(0.0, 0.0, width, height)];
[myCALayer setPosition:CGPointMake(x, y)];

So the 0.0 is suppose to be top left corner, but on my dev environment, it’s out side of the visible screen, still somewhere top left but when I draw an image at 0.0, I can only see the small portion of right bottom of it.

Any idea why this happens?

  • 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-10T14:23:14+00:00Added an answer on June 10, 2026 at 2:23 pm

    position

    Specifies the receiver’s position in the superlayer’s coordinate system. Animatable.

    @property CGPoint position
    

    Discussion

    The position is relative to anchorPoint. The value of this property is specified in points. The default is (0.0, 0.0).

    See “Layer Geometry and Transforms” in Core Animation Programming Guide for more information on the relationship between the bounds, anchorPoint and position properties.

    In default anchorPoint is set up to (0.5,0.5) it’s center of your layer, so if you set the position to (0,0) center of your layer will be at (0,0) – only bottom right corner will be visible, you need to set anchorPoint to (0,0) then set position to (0,0).

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

Sidebar

Related Questions

I'm developing a game for android and this is my first experience with OpenGL.
I am new to cocos2d and im developing my first iphone game. The requirement
We are developing our first iPhone game, and all is going OK for now.
I'm having trouble developing the UI for my first lame game. Here is a
I am developing a game for iPhone using OpenGL ES 1.1. In this game,
I've started developing my first game. Here some my thoughts about architecture: Most examples
I'm developing my first Android game and I'm having a bit of difficulty making
I am a novice programmer for the iPhone. In developing my first game/app, I
I had choosen Cocos2d v1.01rc instead of 2.x when starting developing my first game
I'm developing my first iPhone app. One day, I renamed some files including xib

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.