0

テキストフィールドに配線しないと、UIImageView のサイズ変更が機能します。テキスト領域に書き込むと、サイズ変更は失敗します。テキストへの書き込みがUIImageViewのサイズ変更に悪影響を与える理由がわかりません。

@interface rjhccViewController ()

@end

@implementation rjhccViewController

-(IBAction)myButtonPress{

UIImage *img = [UIImage imageNamed:@"p.png"];
[testcontainer setImage:img];
[testcontainer setFrame:CGRectMake(0.0,0.0,50.0, 50.0)];
[self labelHeight:img];
}

-(void)labelHeight: (UIImage *) myimage{
//self.heightS.text = [NSString stringWithFormat:@"%d",(int)myimage.size.height];

}


- (void)viewDidLoad
{
[super viewDidLoad];
// Do any additional setup after loading the view, typically from a nib.
}

- (void)didReceiveMemoryWarning
{
[super didReceiveMemoryWarning];
// Dispose of any resources that can be recreated.
}

- (void)viewDidUnload {
[self setHeightS:nil];

[super viewDidUnload];
}
@end
4

0 に答える 0