Note that there are some explanatory texts on larger screens.

plurals
  1. POData for UITableView gets changed
    primarykey
    data
    text
    <p>I'm trying to create a Settings icon for the rightBarButtonItem for my UINavigationController. In my application:DidFinishLaunching, I create the button, and set it </p> <pre><code>//pseudo code for applicationdidfinish launching HomeController *home = [[HomeController alloc] init]; // root view of my UINavigationController home.navigationItem.rightBarButtonItem = settingsBarButtonItem; [settingsButton addTarget:self action:@selector(settingsPressed:) forControlEvents:UIcontrolEventTouchUpInside]; // i used a button for the barbuttonitem to not get the bar button item border </code></pre> <p>than in settingsPressed:</p> <pre><code>SettingsController* settings = [[SettingsController alloc] initWithNibName:@"SettingsController" bundle:nil]; UINavigationController* popoverNav = [[UINavigationController alloc] initWithRootViewController:settings]; [settings release]; popover = [[UIPopoverController alloc] initWithContentViewController:popoverNav]; [popoverNav release]; // show settings if ([popover isPopoverVisible]) { [popover dismissPopoverAnimated:YES]; } else { [popover presentPopoverFromBarButtonItem:bbiSettings permittedArrowDirections:UIPopoverArrowDirectionAny animated:YES]; } </code></pre> <p>in SettingsController, in viewDidLoad:</p> <pre><code>NSArray *array = [NSArray arrayWithObjects:@"one", @"two", @"three", nil]; self.DataArray = array; // (nonatomic, retain) [array release]; </code></pre> <p>I do not show this array right away. Like the iPhone Settings app, when they click on one of the cells in my Grouped Table, it opens up a new UITableView. So in that UITableView, in the tableView:numberOfRowsInSection: method, I </p> <pre><code>return [self.DataArray count]; </code></pre> <p>However, it is here that my app crashes. When I look at my array, I now have random stuff in there, like vl.proj sometimes, UIViews, etc. I do not know why this array gets changed. I do not know if it's because I'm calling the popover from the applicaionDelegate which I normally do not do and that is the problem, or if there is something else wrong. Thanks.</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.
 

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