When my app opens the Facebook UIActivityViewController
, there is no navigation bar at the top of the Facebook screen and there is no Cancel or Post button - the only way to exit the screen is to kill the app. Other apps that I look at have an additional navigation bar at the top of the Facebook screen, which holds the Cancel and Post buttons.
Here is the code I am using:
NSURL *url = [NSURL URLWithString:@"http://www.mywebsite.com"];
NSArray *activityItems = @[url];
// Put together the UIActivityViewController
UIActivityViewController *activityVC = [[UIActivityViewController alloc]
initWithActivityItems:activityItems
applicationActivities:nil];
activityVC.excludedActivityTypes = @[UIActivityTypePrint,
UIActivityTypeCopyToPasteboard,
UIActivityTypeAssignToContact,
UIActivityTypeSaveToCameraRoll,
UIActivityTypeAirDrop,
UIActivityTypePostToVimeo,
UIActivityTypePostToFlickr,
UIActivityTypeAddToReadingList];
// Present the UIActivityViewController
[self presentViewController:activityVC
animated:YES
completion:nil];
The Twitter, Email, and SMS screens all appear as expected. Facebook is the only one that is having problems.
Some other notes: I notice that when I open the Facebook Share on this app, the status bar turn black with white text. On another test app that I created, the status bar looks grayed-out with black text. Not sure why / what this points to, but might be a clue.
This problem seems to be app-wide, as I have 3 spots where sharing can be invoked, and it is happening in all 3 instances.
Attaching an image. There should be a Navigation bar above the "To: Public" toolbar.
Any ideas would be appreciated.