2012-03-09 77 views
1

我在我的應用程序中顯示了MFMessageComposeViewController,並且在iOS 5上一切正常,但有些用戶測試抱怨iOS 4,它似乎是視圖控制器,因爲我的下面的代碼顯示空白的短信撰寫,此外沒有頂部導航項目,如取消按鈕甚至標題「新消息」。iOS 4 SMS作曲程序無法正常工作

我沒有任何iOS 4設備(我知道的很糟糕),所以我不能跳到問題和調試它。

任何人都可以看到我是否做錯了什麼?我附上了我發送的問題截圖,這很奇怪。

BOOL canText = [MFMessageComposeViewController canSendText]; 

if(canText){ 
    MFMessageComposeViewController * smsViewController = [[MFMessageComposeViewController alloc] init]; 
    if(smsViewController){ 

     smsViewController.body = @"test message"; 
     smsViewController.messageComposeDelegate = self; 

     [self presentModalViewController:smsViewController animated:YES]; 
     [smsViewController release]; 

    }else{ 
     UIAlertView *alert = [[UIAlertView alloc] initWithTitle:@"SMS" 
                 message:@"Your cannot send SMS on this device." 
                 delegate:nil 
               cancelButtonTitle:@"ok" 
               otherButtonTitles:nil]; 

     [alert show]; 
     [alert release]; 

    } 
}else{ 
    UIAlertView *alert = [[UIAlertView alloc] initWithTitle:@"SMS" 
                message:@"Your cannot send SMS on this device." 
                delegate:nil 
              cancelButtonTitle:@"ok" 
              otherButtonTitles:nil]; 

    [alert show]; 
    [alert release]; 

} 

enter image description here

+0

你在iOS 4.3模擬器上試過嗎? – Till 2012-03-09 10:50:00

+0

當然,正如預測的那樣,canSendText返回NO,所以我不會像顯示任何其他警告 – Daniel 2012-03-09 10:51:39

+0

噢,當然 - 我的壞 - 這不是一個真正的聰明的問題從我身邊)... – Till 2012-03-09 10:53:45

回答

1

我有UINavigationBar的一類通過重寫viewWillAppear中紮下添加一個影子,這個損壞的看法。這是發生了什麼事。