English 中文(简体)
用户对图像进行分辨时,就会发现图像大小
原标题:getting image size when image zoomed by user

how can i get the image size when it s zoomed by user, i write these on my project :

- (UIView *)viewForZoomingInScrollView:(UIScrollView *)scrollView
{
 return imageView;
}
-(void) didLoad{
 UIImageView *tempImageView = [[UIImageView alloc] initWithImage:[UIImage      imageNamed:@"image.jpg"]];
 self.imageView = tempImageView;
 [tempImageView release];

 scrollMapView.contentSize = CGSizeMake(imageView.frame.size.width, imageView.frame.size.height);
 scrollMapView.maximumZoomScale = 4.0;
 scrollMapView.minimumZoomScale = 0.75;
 scrollMapView.clipsToBounds = YES;
 scrollMapView.delegate = self;
 [scrollMapView addSubview:imageView];
}

i 只是想知道图像大小。 谢谢。

最佳回答

愿你们能够做到:

newZoomedWidth = scrollView.zoomScale * imageView.frame.size.width
问题回答

我对这一点可能是错误的(I m 不是一个Pidever),但我不认为图像本身已经变幻不定;它只是滚动观点显示有血清的图像。 因此,它只是一种观念,即变化;形象保持不变。

这意味着,应当能够仅仅在http://developer.apple.com/iphone/library/documentation/UIKit/Reference/UIImageView_Class/Reference/Reference.html#/apple_ref/occ/instp/UIImageView/image” rel=_nofollow noreferer”上标/index_

如果你想要图像群的大小,而不是原体大小,就会发现其原体大小,并将两个层面乘以





相关问题
Code sign Error

I have created a new iPhone application.I have two mach machines. I have created the certificate for running application in iPhone in one mac. Can I use the other mac for running the application in ...

ABPersonViewController Usage for displaying contact

Created a View based Project and added a contact to the AddressBook using ABAddressBookRef,ABRecordRef now i wanted to display the added contact ABPersonViewController is the method but how to use in ...

将音频Clips从Peter改为服务器

我不禁要问,那里是否有任何实例表明从Peit向服务器发送音响。 I m不关心电话或SIP风格的解决办法,只是一个简单的袖珍流程......

• 如何将搜查线重新定位?

我正试图把图像放在搜索条左边。 但是,问题始于这里,搜索条线不能重新布署。

热门标签