SLComposeViewController Views is sent back to the application and becomes immune

I have a button in my application to open SLComposeViewControllerfor use with Twitter. When a presentation is presented, it animates correctly and disappears. I found that when it disappears, it goes in the opposite direction of the current view, and I have no way to return it. I tried manually sending all kinds of top down to the code with no luck. I feel that there is something fundamentally wrong with my application because this behavior is observed at any level for the navigation controller in the application. Below is a screenshot SLComposeViewController, which is the navigation bar in the application, I made the ViewController view with the Alpha value 0.0fto illustrate my point:

enter image description here

, , . , SLComposeViewController, , :

NSString *message = [NSString stringWithFormat:@"#%@", [twitterInfo objectForKey:@"hashtag"]];

if ([appDelegate isSocialAvailable]) {
    // code to tweet with SLComposeViewController
    SLComposeViewController *twitter = [[SLComposeViewController alloc] init];
    twitter = [SLComposeViewController composeViewControllerForServiceType:SLServiceTypeTwitter];
    [twitter setInitialText:[NSString stringWithFormat: @"%@", message]];
    [self presentViewController:twitter animated:YES completion:nil];        
} 
+5
2

, , CAShapeLayer . , .

, , - 0, ! , , , .

, , , . 0, , - -[CALayer insertLayer:layer atIndex:0], .

, , .

:

[viewController presentViewController:facebookViewController
                             animated:YES
                           completion:^{
    facebookViewController.view.layer.zPosition = 1000;
}];
+1

, , , , , , , :

UIImage *bottomOverlayImage = [UIImage imageNamed:@"bottom_overlay.png"];
CALayer *bottomOverlay = [CALayer layer];
bottomOverlay.frame = CGRectMake(0, self.window.frame.size.height - 9, bottomOverlayImage.size.width, bottomOverlayImage.size.height);
bottomOverlay.contents = (id)bottomOverlayImage.CGImage;
bottomOverlay.zPosition = 1;
[self.window.layer addSublayer:bottomOverlay];

- , Twitter, . .

0

All Articles