SORU
16 Mart 2010, Salı


Nasıl bir UİModalPresentationFormSheet yeniden boyutlandırmak için?

Kalıcı bir görünüm UİPresentationFormSheet olarak kumanda görüntülemek için çalışıyorum. Görünüm görünür, ama yeniden boyutlandırmak için görünmüyor olabilir. Benim XİB uygun yükseklik ve genişlik vardır, ama bu gibi aradığımda geçersiz gözüküyor:

composeTweetController = [[ComposeTweet alloc] initWithNibName:@"ComposeTweet" bundle:nil];
composeTweetController.modalPresentationStyle = UIModalPresentationFormSheet;
[self presentModalViewController:composeTweetController animated:TRUE];

Herhangi bir düşünce? İPhone SDK 3.2 beta 4 kullanıyorum

CEVAP
24 Kasım 2010, ÇARŞAMBA


Bunu sunduktan sonra kalıcı bir bakış çerçevesini ayarlamak edebiliyoruz:

Test iOS 5.1 - 7.1

MyModalViewController *targetController = [[[MyModalViewController alloc] init] autorelease];
targetController.modalPresentationStyle = UIModalPresentationFormSheet;
targetController.modalTransitionStyle = UIModalTransitionStyleFlipHorizontal;  //transition shouldn't matter
[self presentViewController:targetController animated:YES completion:nil];

if(floor(NSFoundationVersionNumber) <= NSFoundationVersionNumber_iOS_6_1){
     targetController.view.superview.frame = CGRectInset(targetController.view.superview.frame, 100, 50);
}else{
     targetController.view.frame = CGRectInset(targetController.view.frame, 100, 50);
     targetController.view.superview.backgroundColor = [UIColor clearColor];
}

Bunu Paylaş:
  • Google+
  • E-Posta
Etiketler:

YORUMLAR

SPONSOR VİDEO

Rastgele Yazarlar

  • manadude21

    manadude21

    11 Mart 2008
  • Ownage Pranks

    Ownage Prank

    13 AĞUSTOS 2007
  • UCBerkeley

    UCBerkeley

    3 Mayıs 2006