I am displaying a MFMessageComposeViewController in my app, and all is fine, on iOS 5, but some users testing are complaining about iOS 4, it seems the view controller that appears as a result of my code below is displaying an empty SMS compose and in addition there are no Top Navigation items such as the cancel button or even the title “New Message”.
I don’t have any iOS 4 device to hand (very bad I know), and so I cannot jump into the issue and debug it.
Can anyone see if I’m doing something wrong ? I’ve attached the problem screenshot I was sent, it’s very strange.
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];
}

I had a category for UINavigationBar to add a shadow under the bar by overriding viewWillAppear, this corrupted the view. This is what happened.