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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 30, 20262026-05-30T14:18:14+00:00 2026-05-30T14:18:14+00:00

From the following code // yPos = 0, width = 100, height = 150

  • 0

From the following code

// yPos = 0, width = 100, height = 150
[imagesMutable enumerateObjectsUsingBlock: ^(UIScrollView verticalScroll, NSUInteger idx, BOOL *stop){
  [verticalScroll addSubView:[UIImageView setFrame:CGRectMake(0, yPos, width, height)]]
  // some code
  yPos += (height + 15)
}];

Let’s say, if imagesMutable got 3 objects. And as I read from somewhere that CGRectMake is using cartesian coordinate (x = 0, y = 0 will be bottom left). So, it should be

[verticalScroll addSubView:[UIImageView setFrame:CGRectMake(0, 0, 100, 150)]]
[verticalScroll addSubView:[UIImageView setFrame:CGRectMake(0, 165, 100, 150)]]
[verticalScroll addSubView:[UIImageView setFrame:CGRectMake(0, 330, 100, 150)]]

This should mean that

First CGRectMake should has bottom left at (0, 0) and top right at (100, 150)
Second CGRectMake should has bottom left at (0, 165) and top right at (100, 315) 
Third CGRectMake should has bottom left at (0, 330) and top right at (100, 480)

Then, the order of images from top to bottom should be 3 -> 2 -> 1 comparing to the imagesMutable’s objects ordering (1 -> 2 -> 3)

But why, it appearing in order of 1 -> 2 -> 3 as same as imagesMutable’s objects ordering when I launch the app? Am I missing something?

  • 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-30T14:18:15+00:00Added an answer on May 30, 2026 at 2:18 pm

    (0,0) is not bottom-left but top-left.

    The view has inverted y coordinates, so that y increases as you move down the screen.

    enter image description here

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

Sidebar

Related Questions

I'm trying to extract (80.4) from the following code: <div id=row style=width:80.4px> What would
How would I get returningResponse (into say, a NSString) from the following code: NSURLResponse*
the following code (from a database object created for each new view): -(void)update:(NSString *)queryText{
I have got the following code from here to read an Excel file using
I've got the following code from another question on SO to track the changing
I have the following code: from selenium import selenium selenium = selenium(localhost, 4444, *chrome,
I took the following code from the examples page on Asio class tcp_connection :
I want to execute python code from C# with following code. static void Main(string[]
When I try to run the following code (from the REPL) in Clojure: (dotimes
I am trying to run the following code from within Eclipse: Process process =

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.