I'm trying to add an Image to my view. I tried the following code:
UIImageView *imgView = [[UIImageView alloc] initWithImage:[UIImage imageNamed:@"tag40pixelsborder.png"]];
imgView.frame = CGRectMake(200, 200, 30, 30);
// imgView.bounds = CGRectMake(300, 300, 32, 32);
[imgView setContentMode:UIViewContentModeScaleAspectFit];
[self.view addSubview:imgView];
NSLog(@"frame x %f", imgView.frame.origin.x);
NSLog(@"frame y %f", imgView.frame.origin.y);
But the picture doesn't appear on screen, and NSLog return 30.00 for "x" and 0.00 for "y" If I uncomment the bounds line and I remove the frame line, I get 80.00 for "x" and 80.00 for "y".
I am using autolayout, but the exact same code works on another view! What's wrong?