iPhone:如何获得UIView的左上角坐标?

时间:2010-12-29 02:08:06

标签: iphone objective-c cocoa-touch

我只想获取视图左上角的x,y坐标,我该怎么做? 谢谢!

2 个答案:

答案 0 :(得分:7)

CGPoint topLeft = theView.frame.origin;

答案 1 :(得分:-1)

这是左下--> UPDATE personal p SET p.surname = l_surname, p.name = l_name, p."alter" = l_alter, p.sex = l_sex, p.jobcode = l_jobcode, p.year_wage = l_month_wage * 12 WHERE p.personalnr = l_personalnr;

左上方是:

CGPoint topLeft = theView.frame.origin;