我在我的应用程序中显示了一个MFMessageComposeViewController,一切都很好,在iOS 5上,但一些测试用户正在抱怨iOS 4,似乎作为我以下代码的结果出现的视图控制器正在显示一个空的短信撰写,此外,没有顶部导航项目,如取消按钮,甚至标题“新邮件”。
我手头没有任何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];
}

发布于 2012-03-15 17:15:07
我有一个用于UINavigationBar的类别,它通过覆盖viewWillAppear在栏下添加阴影,这破坏了视图。事情就是这样发生的。
https://stackoverflow.com/questions/9632760
复制相似问题