Note that there are some explanatory texts on larger screens.

plurals
  1. POUIImage/UIImageView redraw when containing UIView is scaled
    primarykey
    data
    text
    <p>My iPad app has a navigation where I show screenshots of the different pages and because I want to show more than one screenshot at once I scale the container to around 24% of the original screenshots (1024x768). </p> <pre><code>- (void) loadView { // get landscape screen frame CGRect screenFrame = [UIScreen mainScreen].bounds; CGRect landscapeFrame = CGRectMake(0, 0, screenFrame.size.height, screenFrame.size.width); UIView *view = [[UIView alloc] initWithFrame:landscapeFrame]; view.backgroundColor = [UIColor grayColor]; self.view = view; // add container view for 2 images CGRect startFrame = CGRectMake(-landscapeFrame.size.width/2, 0, landscapeFrame.size.width*2, landscapeFrame.size.height); container = [[UIView alloc] initWithFrame:startFrame]; container.backgroundColor = [UIColor whiteColor]; // add image 1 (1024x768) UIImage *img1 = [UIImage imageNamed:@"01.jpeg"]; UIImageView *img1View = [[UIImageView alloc] initWithImage:img1]; [container addSubview:img1View]; // add image 2 (1024x768) UIImage *img2 = [UIImage imageNamed:@"02.jpeg"]; UIImageView *img2View = [[UIImageView alloc] initWithImage:img2]; // move img2 to the right of img1 CGRect newFrame = img2View.frame; newFrame.origin.x = 1024.0; img2View.frame = newFrame; [container addSubview:img2View]; // scale to 24% container.transform = CGAffineTransformMakeScale(0.24, 0.24); [self.view addSubview:container]; } </code></pre> <p>but when I scale images with "small" text it looks sth like this:</p> <p><img src="https://i.stack.imgur.com/CbHmU.png" alt=""></p> <p>I have to use the big screenshots because if a user taps the image it should scale to 100% and be crispy clear. </p> <p>is there a way how I can scale the images "smoothly" (on the fly) without ruining performance? it would be enough to have two versions: the full-px one and another for the 24% version. </p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload