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

  • funbro1

    funbro1

    11 Aralık 2007
  • jpmkm1

    jpmkm1

    4 NİSAN 2008
  • listedabive

    listedabive

    30 Ocak 2007