Note that there are some explanatory texts on larger screens.

plurals
  1. POTWTweetComposeViewController a strange indentation on top
    primarykey
    data
    text
    <p>When you call the following <code>twitter</code> method I always get a strange indentation on top.</p> <p><img src="https://i.stack.imgur.com/dlAEv.jpg" alt="enter image description here"></p> <p><strong>Here is my method:</strong></p> <pre><code>- (void)twitter { if ([TWRequest class]) { TWTweetComposeViewController *twitter = [[TWTweetComposeViewController alloc] init]; [twitter setInitialText:titleDetail]; [twitter addImage:imgPreview]; [twitter addURL:[NSURL URLWithString:linkPost]]; [self presentViewController:twitter animated:YES completion:nil]; twitter.completionHandler = ^(TWTweetComposeViewControllerResult res) { if (res == TWTweetComposeViewControllerResultDone) { UIAlertView *alertView = [[UIAlertView alloc] initWithTitle:@"Выполнено" message:@"Ваш твит успешно опубликован" delegate:self cancelButtonTitle:@"OK" otherButtonTitles:nil]; [alertView show]; } else if (res == TWTweetComposeViewControllerResultCancelled) { UIAlertView *alertView = [[UIAlertView alloc] initWithTitle:@"Ошибка" message:@"Ваш твит неопубликован" delegate:self cancelButtonTitle:@"OK" otherButtonTitles:nil]; [alertView show]; } [self dismissModalViewControllerAnimated:YES]; }; } } </code></pre> <p>How do I fix this?</p> <hr> <h1><strong>Update: FIXED</strong></h1> <p>The problem was this: When the application loads (which displays a splash screen) I hide the status bar.</p> <blockquote> <p>The status bar is initially hidden.</p> </blockquote> <p>And then, in <strong><code>AppDelegate.m</code></strong>:</p> <pre><code>[[UIApplication sharedApplication] setStatusBarHidden:NO withAnimation:NO]; [UIApplication sharedApplication].keyWindow.frame = CGRectMake(0, 20, 320, 460); </code></pre> <p>The problem was precisely in <code>20</code>:</p> <pre><code>CGRectMake (0, 20, 320, 460); </code></pre>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload