UIImage in UIView and display image parts out of bounds
Posted
by
Mpampinos Holmens
on Stack Overflow
See other posts from Stack Overflow
or by Mpampinos Holmens
Published on 2012-09-19T15:16:20Z
Indexed on
2012/09/19
15:38 UTC
Read the original article
Hit count: 175
I have an image in a subview that is bigger than the subview it self, is it possible to display parts of the image that are out of the subview! have tried the
view.clipsToBounds=NO;
but no lack still.
here is part of my code so far.
xRayView = [[XRayView alloc] initWithFrame: CGRectMake((1024 - 800) / 2, self.device.frame.origin.y - 26, 800,530)];
xRayView.clipsToBounds=NO;
[xRayView setForgroundImage: [UIImage imageWithContentsOfFile: [[NSBundle mainBundle] pathForResource: @"xray_foreground_01" ofType: @"png"]]];
[xRayView setBackgroundImage: [UIImage imageWithContentsOfFile: [[NSBundle mainBundle] pathForResource: @"xray_background_01" ofType: @"png"]]];
the foreground and the background images are bigger than the xray view
© Stack Overflow or respective owner