Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

About CGRectMake

Tags:

objective-c

This will sound extremely silly and stupid, but I have touched a couple languages and they kind of messed up my sense of.... orientation or something:

In Objective-C, you can use CGRectMake(x,y,w,h) to make a rect. Cool.

So x,y set the... top left corner of the rect, or.... the center of the rect?

like image 969
Voldemort Avatar asked Dec 05 '22 23:12

Voldemort


1 Answers

In UIKit, (x,y) is the upper-left corner.

like image 91
Heath Borders Avatar answered Jan 19 '23 11:01

Heath Borders