Iphone 获取CGPoint与应用程序窗口的比较
我有一个桌面视图。我想找到appDelegates窗口的UIImageView的中心Iphone 获取CGPoint与应用程序窗口的比较,iphone,xcode,uiimageview,Iphone,Xcode,Uiimageview,我有一个桌面视图。我想找到appDelegates窗口的UIImageView的中心 MA_MobileAppDelegate *appDelegate = (MA_MobileAppDelegate *)[[UIApplication sharedApplication] delegate]; UAModalPanel *modalPanel = [[MSPicturePreview alloc] initWithFrame:appDelegate.window.fr
MA_MobileAppDelegate *appDelegate = (MA_MobileAppDelegate *)[[UIApplication sharedApplication] delegate];
UAModalPanel *modalPanel = [[MSPicturePreview alloc] initWithFrame:appDelegate.window.frame withimage:self.customImageView.image];
[appDelegate.window addSubview:modalPanel];
[modalPanel showFromPoint:[appDelegate.window.superview convertPoint:[self.customImageView center] toView:nil]];
下面的代码在左上角指出了这一点。有没有办法获得窗口上图像的实际点?试试这样。我想它会起作用的
[modalPanel showFromPoint:[self.view convertPoint:[self.customImageView center] toView:appDelegate.window.superview];
我用过这个
[modalPanel showFromPoint:[self.contentView convertPoint:[self.customImageView center] toView:appDelegate.window]];
基本上,我使用cells contentView转换appDelegates窗口的点