Change coordinate origin in UIView

后端 未结 2 1717
盖世英雄少女心
盖世英雄少女心 2021-01-21 04:21

Is it possible to change the coordinate system in a UIView so that (0,0) will be the top right hand corner?

2条回答
  •  面向向阳花
    2021-01-21 05:04

            self.view.transform = CGAffineTransformMakeRotation(90.0*0.0174532925);
            self.view.bounds = CGRectMake(0.0f, 0.0f, 480.0f, 320.0f);
    

    should do it for you

提交回复
热议问题