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

  • cosmicrocketman

    cosmicrocket

    17 NİSAN 2006
  • ehowhome

    ehowhome

    22 NİSAN 2009
  • Klemens Torggler

    Klemens Torg

    11 Mart 2008