English 中文(简体)
ModalViewController的UIImageView是Ignoring ContentMode-Pi
原标题:UIImageView in ModalViewController is Ignoring ContentMode - iPhone

我在提出一种模式观点,对内容模式填充表(通过轴心)发出“UIImageView”。 我在模式观察班中设置了UIImage,由家长阶层组成:

NSURL * finishedMovie = [self applicationDocumentsDirectory:@"FinishedVideo.mov"];
MPMoviePlayerController *player = [[MPMoviePlayerController alloc] initWithContentURL:finishedMovie];
UIImage *thumbnail = [player thumbnailImageAtTime:1.0 timeOption:MPMovieTimeOptionNearestKeyFrame];

previewScreen = [[PreviewScreenViewController alloc]initWithNibName:@"PreviewScreenViewController" bundle:nil];
previewScreen.thumbnailImage = thumbnail;
[self presentModalViewController:previewScreen animated:YES];

之后,模式观点本身即:

- (void)viewDidLoad
{
[super viewDidLoad];
// Do any additional setup after loading the view from its nib.
previewImageBox.image = thumbnailImage;

}

问题是,在看来,似乎忽视了轴心中确定的内容模式,而只是将图像全数插入。

这似乎是一种丑恶,因为当我回到这一看法时,UIImage的图像是适当的。

谁能帮助?

感谢。

最佳回答

肯尼亚解决了这一问题! 如果你以人工方式在法典中形成“UIImage”意见,看来是可行的。

// Do any additional setup after loading the view from its nib.
//Work around to solve bug in UIToolkit where aspect ratio is ignored when view loads.
imageView = [[UIImageView alloc] initWithFrame:CGRectMake(13, 87, 294, 164)];
//Set the image to our thumbnail.
[self.view addSubview:imageView];
问题回答

<代码>clips ToBounds property set to NO 这将防止<编码>UIImageView在校外的剪辑内容。 您可以确定<代码> 边界线,以了解这是否确实发生。





相关问题
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风格的解决办法,只是一个简单的袖珍流程......

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

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

热门标签