Note that there are some explanatory texts on larger screens.

plurals
  1. POiPad: tabbar in a detail view of a splitview
    text
    copied!<p>I'm developing my first iPad app with a splitview template, and it all seems to go pretty good. I added a tabbar inside a the detailview of my splitview, every controller i load with the tabbar has the protocol SubstitutableDetailViewController implemented, it all works except the popover button in portait mode that is not showing. What i'm doing wrong?</p> <p>viewcontroller1.h</p> <pre><code> @interface CentriAttivitaViewController : UIViewController &lt;SubstitutableDetailViewController&gt; { UIToolbar *toolbar; UILabel *titolo; }@property (nonatomic, retain) IBOutlet UIToolbar *toolbar; @property (nonatomic, retain) IBOutlet UILabel *titolo; @end </code></pre> <p>`</p> <p>and viewcontroller1.m</p> <pre><code>@synthesize toolbar, titolo; - (id)initWithNibName:(NSString *)nibNameOrNil bundle:(NSBundle *)nibBundleOrNil { self = [super initWithNibName:nibNameOrNil bundle:nibBundleOrNil]; if (self) { // Custom initialization } return self; } - (void)viewDidUnload { [self setTitolo:nil]; [super viewDidUnload]; self.toolbar = nil; } - (void)showRootPopoverButtonItem:(UIBarButtonItem *)barButtonItem { // Add the popover button to the toolbar. NSMutableArray *itemsArray = [toolbar.items mutableCopy]; [itemsArray insertObject:barButtonItem atIndex:0]; [toolbar setItems:itemsArray animated:NO]; [itemsArray release]; } - (void)invalidateRootPopoverButtonItem:(UIBarButtonItem *)barButtonItem { // Remove the popover button from the toolbar. NSMutableArray *itemsArray = [toolbar.items mutableCopy]; [itemsArray removeObject:barButtonItem]; [toolbar setItems:itemsArray animated:NO]; [itemsArray release]; } - (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation { return YES; } - (void)dealloc { [toolbar release]; [titolo release]; [super dealloc]; } -(void)viewDidLoad{ self.titolo.text = @"Qualità"; [super viewDidLoad]; } @end </code></pre>
 

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