Warning: file_get_contents(/data/phpspider/zhask/data//catemap/1/cocoa/3.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Ios 如何获得准确表示视图边界和转换的CGRect?_Ios_Cocoa_Cgaffinetransform_Cgrect - Fatal编程技术网

Ios 如何获得准确表示视图边界和转换的CGRect?

Ios 如何获得准确表示视图边界和转换的CGRect?,ios,cocoa,cgaffinetransform,cgrect,Ios,Cocoa,Cgaffinetransform,Cgrect,如何获取UIView的转换矩形,包括在.transform属性中进行的转换和缩放?我试着这样做: CGRect transformed = CGRectApplyAffineTransform(theview.frame, theview.transform); 不行 您应该使用UIView bounds属性,即 CGRect trans_rect = CGRectApplyAffineTransform(view.bounds, view.transform);

如何获取UIView的转换矩形,包括在.transform属性中进行的转换和缩放?我试着这样做:

CGRect transformed = CGRectApplyAffineTransform(theview.frame, theview.transform);

不行

您应该使用UIView bounds属性,即

CGRect trans_rect = CGRectApplyAffineTransform(view.bounds, view.transform);