"YOU AND THE ART OF ONLINE DATING" is the only product on the market that will take you step-by-step through the process of online dating, provide you with the resources to help ensure success. Get it now!
Up vote 0 down vote favorite share g+ share fb share tw.
I have an Xcode Universal Storyboard project that is properly displaying data for the iPhone but does not display data for the iPad. I had initialized the data array using the code below. It is working properly in the iPhone but does not display data in the iPad and gets the error: -DetailViewController setDataController:: unrecognized selector sent to instance This is the AppDelegate.
M if (UIDevice currentDevice userInterfaceIdiom == UIUserInterfaceIdiomPad) { UISplitViewController *splitViewController = (UISplitViewController *)self.window. RootViewController; UINavigationController *navigationController = splitViewController. ViewControllers lastObject; MasterViewController *masterViewController = (MasterViewController *)navigationController topViewController; DataController *controller = DataController alloc init; masterViewController.
DataController = controller; splitViewController. Delegate = (id)navigationController. TopViewController; } else { // Create the data controller and pass it to the master view controller.
UINavigationController *navigationController = (UINavigationController *)self.window. RootViewController; MasterViewController *masterViewController = (MasterViewController *) navigationController topViewController; DataController *controller = DataController alloc init; masterViewController. DataController = controller; } The compiler is complaining about the DetailViewController here is that file.
#import "DetailViewController. H" #import "Play. H" @interface DetailViewController () @property (strong, nonatomic) UIPopoverController *masterPopoverController; @end @implementation DetailViewController @synthesize masterPopoverController = _masterPopoverController; @synthesize play; #pragma mark - #pragma mark View lifecycle - (void)viewWillAppear:(BOOL)animated { super viewWillAppear:animated; // Scroll the table view to the top before it appears self.
TableView reloadData; self. TableView setContentOffset:CGPointZero animated:YES; //self. Part = play.
Part; } - (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation { if (UIDevice currentDevice userInterfaceIdiom == UIUserInterfaceIdiomPhone) { return (interfaceOrientation! = UIInterfaceOrientationPortraitUpsideDown); } else { return YES; } } #pragma mark - Split view - (void)splitViewController:(UISplitViewController *)splitController willHideViewController:(UITableViewController *)viewController withBarButtonItem:(UIBarButtonItem *)barButtonItem forPopoverController:(UIPopoverController *)popoverController { barButtonItem. Title = NSLocalizedString(@"Trading Rules That Work", @"Trading Rules That Work"); self.
NavigationItem setLeftBarButtonItem:barButtonItem animated:YES; self. MasterPopoverController = popoverController; } - (void)splitViewController:(UISplitViewController *)splitController willShowViewController:(UITableViewController *)viewController invalidatingBarButtonItem:(UIBarButtonItem *)barButtonItem { // Called when the view is shown again in the split view, invalidating the button and popover controller. Self.
NavigationItem setLeftBarButtonItem:nil animated:YES; self. MasterPopoverController = nil; } #pragma mark - #pragma mark Table view data source - (NSInteger)numberOfSectionsInTableView:(UITableView *)tableView { // There are 2 sections, for rule, and media, in that order. Return 2; } - (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section { //The number of rows varies by section.
NSInteger rows = 0; switch (section) { case 0: // For part and date there is just one row. Rows = 1; break; case 1: // For the media section, there are as many rows as there are media. Rows = play.
Media count; break; default: break; } return rows; } - (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath { static NSString *CellIdentifier = @"CellIdentifier"; UITableViewCell *cell = tableView dequeueReusableCellWithIdentifier:CellIdentifier; if (cell == nil) { cell = UITableViewCell alloc initWithStyle:UITableViewCellStyleDefault reuseIdentifier:CellIdentifier; cell. AutoresizingMask = UIViewAutoresizingFlexibleHeight; cell. SelectionStyle = UITableViewCellSelectionStyleNone; cell.textLabel.
Font = UIFont boldSystemFontOfSize:11; cell.textLabel. NumberOfLines = 13; } NSString *cellText = nil; switch (indexPath. Section) { case 0: cellText = play.
Part; break; case 1: cellText = play. Media objectAtIndex:indexPath. Row; break; default: break; } cell.textLabel.
Text = cellText; return cell; } #pragma mark - #pragma mark Section header titles /* HIG note: In this case, since the content of each section is obvious, there's probably no need to provide a title, but the code is useful for illustration. */ - (NSString *)tableView:(UITableView *)tableView titleForHeaderInSection:(NSInteger)section { NSString *title = nil; switch (section) { case 0: title = NSLocalizedString(@"Video Description", @"Part section title"); break; case 1: title = NSLocalizedString(@"Media", @"Main Media section title"); break; default: break; } return title; } @end objective-c storyboard runtime-error link edited 2 mins agoIulius Cæsar15.7k51635 asked 9 mins agoChip Russell1.
I cant really gove you an answer,but what I can give you is a way to a solution, that is you have to find the anglde that you relate to or peaks your interest. A good paper is one that people get drawn into because it reaches them ln some way.As for me WW11 to me, I think of the holocaust and the effect it had on the survivors, their families and those who stood by and did nothing until it was too late.