Ios 如何计算相对于iPad背景图像的UIView位置
我有背景图像,希望能够将Ios 如何计算相对于iPad背景图像的UIView位置,ios,objective-c,ipad,Ios,Objective C,Ipad,我有背景图像,希望能够将UIViews添加到该图像上的某个点。然而,当它加载到另一个设备上时,它将位于不同的位置,因为图像帧是self.view.bounds 是否有一种方法可以存储相对于图像的ui视图位置 谢谢使用UIView中提供的以下方法 (CGPoint)convertPoint:(CGPoint)point-to-view:(可为空的UIView*)视图 (CGPoint)convertPoint:(CGPoint)point fromView:(可为null的UIView*)视图
UIViews
添加到该图像上的某个点。然而,当它加载到另一个设备上时,它将位于不同的位置,因为图像帧是self.view.bounds
是否有一种方法可以存储相对于图像的ui视图
位置
谢谢使用UIView中提供的以下方法
- (CGPoint)convertPoint:(CGPoint)point-to-view:(可为空的UIView*)视图李>
- (CGPoint)convertPoint:(CGPoint)point fromView:(可为null的UIView*)视图李>
- (CGRect)convertRect:(CGRect)rect-toView:(可为空的UIView*)视图李>
- (CGRect)convertRect:(CGRect)rect fromView:(nullable UIView*)视图李>