Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>It would be better to check for this in your initial view controller and present the Terms and Conditions view. The following will init and present the view from your view controller:</p> <pre><code>UIViewController *tncView = [self.storyboard instantiateViewControllerWithIdentifier:@"TermsViewController"]; [tncView setModalInPopover:YES]; [tncView setModalPresentationStyle:UIModalPresentationFormSheet]; [tncView setModalTransitionStyle:UIModalTransitionStyleFlipHorizontal]; [self presentViewController:tncView animated:YES completion:NULL]; </code></pre> <p>Then, from your T&amp;C view controller, to exit:</p> <pre><code>[self dismissViewControllerAnimated:YES completion:NULL]; </code></pre> <p>UPDATE: If you are using a .xib file for your view, then just initialize it as so:</p> <pre><code>termsViewController *tncView = [[termsViewController alloc] initWithNibName:@"termsView" bundle:nil]; </code></pre> <p>Where <code>termsViewController</code> is the class name for your EULA's view controller, and <code>termsView</code> is the name of your xib/nib file, without the extension (iOS 4.0+ doesn't require the extension).</p> <p>If you didn't use a nib/xib and wrote the view controller programmatically:</p> <pre><code>termsViewController *tncView = [[termsViewController alloc] init]; </code></pre> <p>If using a storyboard, you'd use what I posted above:</p> <pre><code> UIViewController *tncView = [self.storyboard instantiateViewControllerWithIdentifier:@"TermsViewController"]; </code></pre> <p>After initializing the view controller, you set its presentation properties:</p> <pre><code>[tncView setModalInPopover:YES]; [tncView setModalPresentationStyle:UIModalPresentationFormSheet]; [tncView setModalTransitionStyle:UIModalTransitionStyleFlipHorizontal]; </code></pre> <p>And, finally, present the view. I would do it in your initial view controller's <code>viewDidAppear</code> method:</p> <pre><code>- (void)viewDidAppear:(BOOL)animated { [self presentViewController:tncView animated:YES completion:NULL]; } </code></pre> <p>Let me know if this works out for you.</p>
    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.
    1. This table or related slice is empty.
    1. VO
      singulars
      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