Search Results

Search found 218 results on 9 pages for 'didselectrowatindexpath'.

Page 7/9 | < Previous Page | 3 4 5 6 7 8 9  | Next Page >

  • iPhone app, navigationcontroller not functioning?

    - by dramaticlook
    I have 4 tabs in a tab bar. In one of the tabs i want to use a navigation, i.e. when i click an item from the list it should go to some details page about it. I have the list page where i have the navigation bar and the list of items. I can scroll them, but when I click any of them the selection animation happens, console logs the true row value, it even prints log instructions from constructor of the Details page but I can not see the Details page showing up. (btw Xcode 3.2.6 with iOS 4.3) - (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath { NSString *rowValue = [myStrings objectAtIndex:indexPath.row]; NSLog(rowValue); //[Utility setStr:rowValue]; [self.myTable deselectRowAtIndexPath:indexPath animated:TRUE]; //DETAILS PAGE HERE!!!! RestViewController * rest= [[RestViewController alloc] init]; rest.scoreLabel.text = rowValue; [self.navigationController pushViewController:rest animated:TRUE]; [rest release]; } Anybody having any idea? Thanks in advance!!!

    Read the article

  • Unable to dismiss MFMailComposeViewController, delegate not called

    - by Rod
    HI, I am calling MFMailComposeViewController from UITableViewController. Problem is, delegate method mailComposeController:(MFMailComposeViewController)controllerdidFinishWithResult* is never called when I select Cancel or Send button in Mail compose window. Here is the table view class: @implementation DetailsTableViewController - (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath { if (indexPath.section==0 && indexPath.row==4){ //SEND MAIL MFMailComposeViewController *controller = [[MFMailComposeViewController alloc] init]; controller.mailComposeDelegate = self; if ([MFMailComposeViewController canSendMail]) { [controller setSubject:[NSString stringWithFormat:@"Ref %@",[item objectForKey:@"reference"]]]; [controller setMessageBody:@" " isHTML:NO]; [controller setToRecipients:[NSArray arrayWithObject:[item objectForKey:@"email"]]]; [self presentModalViewController:controller animated:YES]; } [controller release]; } } - (void)mailComposeController:(MFMailComposeViewController*)controllerdidFinishWithResult:(MFMailComposeResult)result error:(NSError*)error { // NEVER REACHES THIS PLACE [self dismissModalViewControllerAnimated:YES]; NSLog (@"mail finished"); } The application don't crash. After Cancel or Send button is presses Compose Window stays on the screen with buttons disabled. I can exit application pressing Home key. I am able to open other Modal Views form TableView but not MailCompose.

    Read the article

  • How do I pass an NSString through 3 ViewControllers?

    - by dBloc
    hey, I'm currently using the iPhone SDK and I'm having trouble passing an NSString through 3 views I am able to pass an NSString between 2 view controllers but I am unable to pass it through another one. My code is as follows... `- (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)index`Path { NSString *string1 = nil; NSDictionary *dictionary = [listOfItems objectAtIndex:indexPath.section]; NSArray *array = [dictionary objectForKey:@"items"]; string1 = [array objectAtIndex:indexPath.row]; //Initialize the detail view controller and display it. ViewController2 *vc2 = [[ViewController2 alloc] initWithNibName:@"ViewController2" bundle:[NSBundle mainBundle]]; vc2.string1 = string1; [self.navigationController pushViewController:vc2 animated:YES]; [vc2 release]; vc2 = nil; } in the "ViewController 2" implementations I am able use "string1" in the title bar by doing the following.... - (void)viewDidLoad { [super viewDidLoad]; self.navigationItem.title = string1; UIBarButtonItem *addButton = [[[UIBarButtonItem alloc] initWithImage:[UIImage imageNamed:@"icon_time.png"] style:UIBarButtonItemStylePlain //style:UIBarButtonItemStyleBordered target:self action:@selector(goToThirdView)] autorelease]; self.navigationItem.rightBarButtonItem = addButton; } but I also have a NavBar Button on the right side that I would like to push a new view - (void)goToThirdView { ViewController3 *vc3 = [[ViewController3 alloc] initWithNibName:@"ViewController3" bundle:[NSBundle mainBundle]]; [self.navigationController pushViewController:NESW animated:YES]; vc3.string1 = string1 ; [vc3 release]; vc3 = nil; } How do I pass on that same string to the third view? (or fourth)

    Read the article

  • Passing UITableView's with parsing XML

    - by Luai Kalkatawi
    I am parsing XML and I select from the UITablevView but I have an issue that how I am going to change the link on each selection? For example; www.example.com/test12.php?d=0 www.example.com/test12.php?d=1&il=istanbul www.example.com/test12.php?d=2&il=istanbul&ilce=kadikoy How can I change the d= and il= and ilce= value on each select on the UITableView? I have write this but couldn't go further. -(void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath { UITableViewCell *selectedCell = [tableView cellForRowAtIndexPath:indexPath]; NSString *cellText = selectedCell.textLabel.text; NSString *linkID = @"http://example/test12.php?d=@%&il=@%"; NSLog(@"%@ Selected", cellText); } - (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath { static NSString *CellIdentifier = @"Cell"; UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:CellIdentifier]; containerObject = [objectCollection objectAtIndex:indexPath.row]; if (cell == nil) { cell = [[UITableViewCell alloc] initWithStyle:UITableViewCellStyleDefault reuseIdentifier:CellIdentifier]; } // Set up the cell... cell.textLabel.text = containerObject.city; return cell; } Thanks from now.

    Read the article

  • Tableview not drilling down

    - by JoshD
    I have a Tableview which is loaded with a dummy list of exercises. I need to drill to a different page. My didSelectRow is being called, but not implementing the method. The app is a tab bar navigation app that loads a UITableView. #import <UIKit/UIKit.h> @interface Schedule : UIViewController <UITableViewDelegate, UITableViewDataSource> { NSArray *mySchedule; } @end #import "Schedule.h" #import "AnotherViewController.h" @implementation Schedule - (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section{ return mySchedule.count; } - (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath{ //create a cell UITableViewCell *cell = [[UITableViewCell alloc] initWithStyle:UITableViewCellStyleDefault reuseIdentifier:@"cell"]; //fill it with contents cell.textLabel.text = [mySchedule objectAtIndex:indexPath.row]; //return it return cell; } - (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath{ AnotherViewController *anotherViewController = [[AnotherViewController alloc] initWithNibName:@"AnotherViewController" bundle:nil]; [self.navigationController pushViewController:anotherViewController animated:YES]; [anotherViewController release]; } /* // The designated initializer. Override if you create the controller programmatically and want to perform customization that is not appropriate for viewDidLoad. - (id)initWithNibName:(NSString *)nibNameOrNil bundle:(NSBundle *)nibBundleOrNil { if (self = [super initWithNibName:nibNameOrNil bundle:nibBundleOrNil]) { // Custom initialization } return self; } */ // Implement viewDidLoad to do additional setup after loading the view, typically from a nib. - (void)viewDidLoad { NSString *myFile = [[NSBundle mainBundle] pathForResource:@"exercise" ofType:@"plist"]; mySchedule = [[NSArray alloc] initWithContentsOfFile:myFile]; [super viewDidLoad]; }

    Read the article

  • iphone selecting a row to change view

    - by Rob J
    I have created the view Controllers and attached those to control their respective views. I can't figure out how to make the following code to go the right views though. (This is in the root view controller:) - (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath { RunViewController *runViewController = [[RunViewController alloc] initWithNibName:@"RunView" bundle:[NSBundle mainBundle]]; CalcViewController *calcViewController = [[CalcViewController alloc] initWithNibName:@"CalcView" bundle:[NSBundle mainBundle]]; PushViewController *pushViewController = [[PushViewController alloc] initWithNibName:@"PushView" bundle:[NSBundle mainBundle]]; SitViewController *sitViewController = [[SitViewController alloc] initWithNibName:@"SitView" bundle:[NSBundle mainBundle]]; TimerViewController *timerViewController = [[TimerViewController alloc] initWithNibName:@"TimerView" bundle:[NSBundle mainBundle]]; [self.navigationController pushViewController:runViewController animated:YES]; [runViewController release]; [self.navigationController pushViewController:pushViewController animated:YES]; [pushViewController release]; [self.navigationController pushViewController:sitViewController animated:YES]; [sitViewController release]; [self.navigationController pushViewController:timerViewController animated:YES]; [timerViewController release]; [self.navigationController pushViewController:calcViewController animated:YES]; [calcViewController release]; runViewController = nil; pushViewController = nil; sitViewController = nil; timerViewController = nil; calcViewController = nil; } Each time I select any of the rows in the table - all of the views come up. How do I arrange them to only open the view that it is supposed to?

    Read the article

  • Need help getting parent reference to child view controller

    - by Andy
    I've got the following code in one of my view controllers: - (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath { switch (indexPath.section) { case 0: // "days" section tapped { DayPicker *dayPicker = [[DayPicker alloc] initWithStyle:UITableViewStylePlain]; dayPicker.rowLabel = self.activeDaysLabel; dayPicker.selectedDays = self.newRule.activeDays; [self.navigationController pushViewController:dayPicker animated:YES]; [dayPicker release]; break; ... Then, in the DayPicker controller, I do some stuff to the dayPicker.rowLabel property. Now, when the dayPicker is dismissed, I want the value in dayPicker.rowLabel to be used as the cell.textLabel.text property in the cell that called the controller in the first place (i.e., the cell label becomes the option that was selected within the DayPicker controller). I thought that by using the assignment operator to set dayPicker.rowLabel = self.activeDaysLabel, the two pointed to the same object in memory, and that upon dismissing the DayPicker, my first view controller, which uses self.activeDaysLabel as the cell.textLabel.text property for the cell in question, would automagically pick up the new value of the object. But no such luck. Have I missed something basic here, or am I going about this the wrong way? I originally passed a reference to the calling view controller to the child view controller, but several here told me that was likely to cause problems, being a circular reference. That setup worked, though; now I'm not sure how to accomplish the same thing "the right way." As usual, thanks in advance for your help.

    Read the article

  • How to "reset" subviews of scrollview for new items?

    - by Tom Tallak Solbu
    I have a MasterViewController displaying Items. Selecting an Item (ItemA), displays images of ItemA in a DetailViewController. The DeatilViewController contains a scrollView, displaying all the images. When tableView:didSelectRowAtIndexPath is called, the images is added to an UIImageView, that is tagged and added as a subview to a scrollview. NSUInteger i; for (i = 1; i <= numberOfImages; i++) { NSString *imageName = [ItemAImages objectAtIndex:i-1]; UIImage *image = [UIImage imageNamed:imageName]; UIImageView *imageView = [[UIImageView alloc] initWithImage:image]; imageView.tag = i; [scrollView addSubview:imageView]; } Works fine. But when I go back to the MasterViewController, and selects a ItemB, the ItemA is still displayed, like the iPhone simulator refuses to forget the previous scrollview,containing ItemA images. I have tried [subview removeFromSuperview]; which results in either no scrollview at all, or no effect. Depending on when this method is called. How can I "reset" the scrollview for the next Item?

    Read the article

  • How to create a tabbar on clicking a row in table in iphone?

    - by Warrior
    My first view consist of table with 7 rows of data.When i click each row it should navigate to a view with tab bar with 4 tabitems .In this what is the proper approac of creating a tab bar. When should i create it.Should i create in didSelectRowAtIndexPath of the table in first view like this UITabBarController *tabbar=[[UITabBarController alloc] init]; Homepageview* vc1 = [[Homepageview alloc] initWithNibName:@"Homepageview" bundle:nil] ; vc1.tabBarItem.title=@"Home"; vc1.tabBarItem.image = [UIImage imageNamed:@"home.png"]; ShoppingView* vc2 = [[ShoppingView alloc] initWithNibName:@"ShoppingView" bundle:nil]; vc2.tabBarItem.title=@"Shopping"; vc2.tabBarItem.image = [UIImage imageNamed:@"shopping.png"]; Checkout* vc3 = [[Checkout alloc] initWithNibName:@"Checkout" bundle:nil] ; vc3.tabBarItem.title=@"Checkout"; vc3.tabBarItem.image = [UIImage imageNamed:@"checkout1.png"]; Settings *vc4=[[SlSettings alloc] initWithNibName:@"Settings" bundle:nil] ; vc4.tabBarItem.title=@"Settings"; vc4.tabBarItem.image = [UIImage imageNamed:@"setting1.png"]; tabbar.delegate = self; tabbar.viewControllers = [NSArray arrayWithObjects:vc1, vc2, vc3,vc4,nil]; //self.navigationItem.title=@"Snhopping list"; //[tabbar.selectedViewController viewDidAppear:YES]; [self.navigationController pushViewController:tabbar animated:YES]; [vc1 release]; [vc2 release]; [vc3 release]; [vc4 release]; [tabbar release]; Or is there any alternate to do it. If i do it by the above method , when i navigate from the home page view of tabbar to another view then i am not able to get tab bar.Please help me out.Thanks.

    Read the article

  • Help adding a backgroundView to UITableViewCell

    - by Alex
    I'm getting really desperate trying to add a UIImageView to UITableViewCell.backgroundView. All my efforts have resulted in this crappy rendering: It looks like the cell's label's white background is sitting on top of cell's background and covering portions of it. I tried setting the label's background color to clear, or some other color and it does not have any event. It is always white. The reason I know it's the text label's background causing this white area is that if I don't do [cell setText:@"Cell text here"]; the white area is gone and I see just the cell's background image. Here's the code that I'm using. The table view is added in the .xib file and UITableView is added to UIViewController: - (NSInteger)numberOfSectionsInTableView:(UITableView *)tableView { return 1; } - (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section { return [myCollection.items count]; } - (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath { NSUInteger rowIndex = indexPath.row; static NSString *CellIdentifier = @"Cell"; UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:CellIdentifier]; if (cell == nil) { cell = [[[UITableViewCell alloc] initWithStyle:UITableViewCellStyleDefault reuseIdentifier:CellIdentifier] autorelease]; cell.backgroundView = [[UIImageView alloc] initWithImage:[UIImage imageNamed:@"darkCellBackground.png"]]; cell.selectedBackgroundView = [[UIImageView alloc] initWithImage:[UIImage imageNamed:@"darkCellBackground.png"]]; } [cell setText:@"Cell text here"]; return cell; } - (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath { // Navigation logic may go here. Create and push another view controller. // AnotherViewController *anotherViewController = [[AnotherViewController alloc] initWithNibName:@"AnotherView" bundle:nil]; // [self.navigationController pushViewController:anotherViewController]; // [anotherViewController release]; [tableView deselectRowAtIndexPath:indexPath animated:YES]; } - (BOOL)tableView:(UITableView *)tableView canEditRowAtIndexPath:(NSIndexPath *)indexPath { return NO; } I'm sure I'm doing something wrong but cant quite figure out what.

    Read the article

  • Loading a UIView from a UITableview

    - by Michael Robinson
    I can firgure out how to push a UIView from a Tableview and have the "child" details appear. Here is the view I'm trying to load: Here is the code that checks for children and either pushes a itemDetail.xib or an additional UITable, I want to use the above .xib but load the correct contents "tableDataSource" into the UItable: - (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath { //Get the dictionary of the selected data source. NSDictionary *dictionary = [self.tableDataSource objectAtIndex:indexPath.row]; //Get the children of the present item. NSArray *Children = [dictionary objectForKey:@"Children"]; if([Children count] == 0) { ItemDetailViewController *dvController = [[ItemDetailViewController alloc] initWithNibName:@"ItemDetailView" bundle:[NSBundle mainBundle]]; [self.navigationController pushViewController:dvController animated:YES]; [dvController release]; } else { //Prepare to tableview. FirstTab *rvController = [[FirstTab alloc] initWithNibName:@"FirstView" bundle:[NSBundle mainBundle]]; //Increment the Current View rvController.CurrentLevel += 1; //Set the title; rvController.CurrentTitle = [dictionary objectForKey:@"Title"]; //Push the new table view on the stack [self.navigationController pushViewController:rvController animated:YES]; rvController.tableDataSource = Children; [rvController release]; } } Thanks for the help. I see lots of stuff on this but can't find the correct push instructions.

    Read the article

  • Undeclared - 'first use in function'

    - by Ragunath Jawahar
    I'm new to Objective-C, though I have a very good hand in Android. I'm trying to make a call to a method but it gives me 'first use in function'. I know I'm making a silly mistake but experts could figure it out easily. RootViewController.h #import <UIKit/UIKit.h> #import "ContentViewController.h" @interface RootViewController : UITableViewController { ContentViewController *contentViewController; } @property (nonatomic, retain) ContentViewController *contentViewController; - (NSString*)getContentFileName:(NSString*)title; //<--- This function declartion @end RootViewController.m #import "RootViewController.h" #import "HAWATAppDelegate.h" #import "ContentViewController.h" @implementation RootViewController @synthesize contentViewController; ... more methods ... #pragma mark - #pragma mark Table view delegate - (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath { HAWATAppDelegate *appDelegate = (HAWATAppDelegate *)[[UIApplication sharedApplication] delegate]; NSString *title = (NSString *) [appDelegate.titles objectAtIndex:indexPath.row]; NSString *fileName = getContentFileName:title; //<--- Here is the error ... } - (NSString*) getContentFileName:(NSString*)title { return [title lowercaseString]; } @end There must be a simple thing I'm missing. Please let me know. Thanks in advance.

    Read the article

  • Problem in data binding in NSString?

    - by Rajendra Bhole
    Hi, I selecting the row of the table. The text of the row i stored in the application delegate object as a NSString. That NSString i want to retrieving or binding in SELECT statement of SQLite query, For that i written code in the TableView Class (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath { selectedText = [appDelegate.categoryArray objectAtIndex:indexPath.row]; appDelegate.selectedTextOfRow = selectedText; ListOfPrayersViewController *listVC = [[ListOfPrayersViewController alloc] init]; [self.navigationController pushViewController:listVC animated:YES]; [listVC release]; } and database class class code is. + (void) getDuas:(NSString *)dbPath{ if(sqlite3_open([dbPath UTF8String], &database) == SQLITE_OK){ SalahAppDelegate *appDelegate = (SalahAppDelegate *)[[UIApplication sharedApplication] delegate]; NSString *categoryTextForQuery =[NSString stringWithFormat:@"SELECT Category FROM Prayer WHERE Category ='%s'", appDelegate.selectedTextOfRow ]; NSLog(@"The Text %@", categoryTextForQuery); //const char *sqlQuery1 = (char *)categoryTextForQuery; //const char *sqlQuery = "SELECT Category FROM Prayer WHERE Category = 'Invocations for the beginning of the prayer'"; sqlite3_stmt *selectstmt; if(sqlite3_prepare_v2(database, [categoryTextForQuery UTF8String], -1, &selectstmt, NULL) == SQLITE_OK){ appDelegate.duasArray =[[NSMutableArray alloc] init]; while(sqlite3_step(selectstmt) == SQLITE_ROW){ NSString *dua = [[NSString alloc] initWithCString:(char *)sqlite3_column_text(selectstmt,0) encoding:NSASCIIStringEncoding]; Prayer *prayerObj = [[Prayer alloc] initwithDuas:dua]; prayerObj.DuaName = dua; [appDelegate.duasArray addObject:prayerObj]; } } } } The code is comes out of loop on the statement or starting the loop of the while(sqlite3_step(selectstmt) == SQLITE_ROW) Why? How i bind the table selected text in SELECT statement of sqlite?

    Read the article

  • Why won't my UITableViewCell deselect and update its text?

    - by Josh
    I have a UITableView with a list of stories and a cell at the bottom that loads more stories. I am trying to make the "More Stories..." cell deselect and change its text to "Loading..." when clicked. I have searched all over the internet and all over stackoverflow and I cant figure out why my code isnt working right. Right now, when the "More Stories..." cell is clicked, it stays selected and doesnt ever change its text. - (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath { // Navigation logic int storyIndex = [indexPath indexAtPosition: [indexPath length] - 1]; if (storyIndex == [stories count]) { UITableViewCell *moreCell = [tableView dequeueReusableCellWithIdentifier:@"more"]; if (moreCell == nil) { moreCell = [[[UITableViewCell alloc] initWithStyle:UITableViewCellStyleSubtitle reuseIdentifier:@"more"] autorelease]; } // Set up the cell moreCell.textLabel.text = @"Loading..."; [tableView deselectRowAtIndexPath:indexPath animated:YES]; [self moreStories]; } else { NSLog(@"%@",[[stories objectAtIndex: storyIndex] objectForKey: @"link"]); webViewController *webController; webController = [[webViewController alloc] initWithURLPassed:[[stories objectAtIndex: storyIndex] objectForKey: @"link"]]; [self.navigationController pushViewController:webController animated:YES]; [webController release]; webController =nil; self.navigationItem.backBarButtonItem = [[UIBarButtonItem alloc] initWithTitle:@"Back" style:UIBarButtonItemStylePlain target:nil action:nil]; } }

    Read the article

  • expected ":" before "]" token + confused by earlier errors, bailing out

    - by Colby Bookout
    Ok so im at my wit's end here. I have tried every imaginable thing to get rid of these errors heres my code: - (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath { // Navigation logic may go here. Create and push another view controller. /* //<#DetailViewController#> *detailViewController = [[<#DetailViewController#> alloc] initWithNibName:@"<#Nib name#>" bundle:nil]; // ... // Pass the selected object to the new view controller. [self.navigationController pushViewController:detailViewController animated:YES]; [detailViewController release]; */ NSInteger row = [indexPath.row]; if (self.nameExcerptPage == nil) { NameOTWexcerpt *nameExcerptPageDetail = [[nameExcerptPage alloc] initWithNibName:@"NameOTWexcerpt" bundle:nil]; self.nameExcerptPage = nameExcerptPageDetail; [nameExcerptPageDetail release]; nameExcerptPage.title = [NSString stringWithFormat:@"%&", [TheBookNavTabs objectAtIndex:row]]; Rothfuss_ReaderAppDelegate *delegate = [[UIApplication sharedApplication] delegate]; [delegate.SecondTableViewController pushViewController:TheBookNavTabs animated:YES]; } } and the error appears where it says "NSInteger row = [indexPath.row]; please help! thanks!

    Read the article

  • how to clear a data in tableviewcell again start reload?

    - by Ios_learner
    i'm developing a bluetooth apps.1) I want to hide a tableview when i start the apps..after i pressed a action button i want to enable a tableview.. 2)if i again press a action button means tableviewcell clear the data and show empty before searching..give me an idea.. some of the code- - (IBAction)connectButtonTouched:(id)sender { [self.deviceTable reloadData]; self.connectButton.enabled = YES; [self.deviceTable reloadData]; peripheralManager = [[PeripheralManager alloc] init]; peripheralManager.delegate = self; [peripheralManager scanForPeripheralsAndConnect]; [self.deviceTable reloadData]; [NSTimer scheduledTimerWithTimeInterval:(float)5.0 target:self selector:@selector (connectionTimer:) userInfo:nil repeats:YES]; alert=[[UIAlertView alloc] initWithTitle:@"Bluetooth" message:@"Scanning" delegate:nil cancelButtonTitle:@"Cancel" otherButtonTitles:nil]; UIActivityIndicatorView *progress=[[UIActivityIndicatorView alloc] initWithFrame:CGRectMake(125, 50, 30, 30)]; [alert addSubview:progress]; [progress startAnimating]; [alert show]; } tableview -(NSInteger)numberOfSectionsInTableView:(UITableView *)tableView { return 1; } -(NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section { return [device count]; } -(UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath { static NSString *CellIdentifier=@"Cell"; UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:CellIdentifier]; if(cell==nil) { cell =[[UITableViewCell alloc] initWithStyle:UITableViewCellStyleDefault reuseIdentifier:CellIdentifier]; } cell.textLabel.text=[device objectAtIndex:indexPath.row]; cell.accessoryType=UITableViewCellAccessoryDetailDisclosureButton; return cell; } TableView Delegate - (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath { UITableViewCell *cell=[tableView cellForRowAtIndexPath:indexPath]; [self performSegueWithIdentifier:@"TableDetails" sender:tableView]; }

    Read the article

  • Terminating app due to uncaught exception 'NSGenericException', reason: '*** Collection <CALayerArray: 0x66522e0> was mutated while being enumerated

    - by fahu
    some times my app crashed by showing * Collection was mutated while being enumerated . This is occurring in same line of code all the time.please help me on this issue. i stuck on this. the app is crashing at pushing view controller line of my code.but it is not frequent one. my error console Terminating app due to uncaught exception 'NSGenericException', reason: '* Collection CALayerArray: 0x1030c730 was mutated while being enumerated. "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "" )' my code: - (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath { ServiceDetails *service=[[ServiceDetails alloc] initWithNibName:@"ServiceDetails" bundle:nil]; CompanyListingForm *list=[[CompanyListingForm alloc]initWithNibName:@"CompanyListingForm" bundle:nil]; [category_company_text resignFirstResponder]; if(viewHoldingTable) { [viewHoldingTable removeFromSuperview]; } if (category_clicked_flag==0) { if (location_or_cat_com==0) { NSMutableArray *get=[district_array objectAtIndex:indexPath.row]; locationid=[[get objectAtIndex:0]intValue]; [location_textfield resignFirstResponder]; location_textfield.text=[get objectAtIndex:1]; } else { if (draggingView) { [draggingView removeFromSuperview]; } if (viewHoldingTable) { [viewHoldingTable removeFromSuperview]; } NSMutableArray *get=[company_array objectAtIndex:indexPath.row]; category_company_text.text=[get objectAtIndex:1]; service.ida=[NSString stringWithFormat:@"%d",[[get objectAtIndex:0] intValue]]; service.idloc=[NSString stringWithFormat:@"%d",locationid]; [self.navigationController pushViewController:service animated:YES];//getting error at this point. //[emer release]; } } else { if (location_or_cat_com==0) { NSMutableArray *get=[district_array objectAtIndex:indexPath.row]; locationid=[[get objectAtIndex:0]intValue]; [location_textfield resignFirstResponder]; location_textfield.text=[get objectAtIndex:1]; } else { NSMutableArray *get=[category_array objectAtIndex:indexPath.row]; category_company_text.text=[get objectAtIndex:1]; int catid=[[get objectAtIndex:0]intValue]; list.IDForLoc=[NSString stringWithFormat:@"%d",locationid]; list.IDForCat=[NSString stringWithFormat:@"%d",catid]; list.companydetails=[get objectAtIndex:1]; [self.navigationController pushViewController:list animated:YES];//getting error at this point. } } [service release]; [list release]; }

    Read the article

  • NSFetchedResultsController fetch request - updating predicate and UITableView

    - by Macatomy
    In my iPhone Core Data app I have it configured in a master-detail view setup. The master view is a UITableView that lists objects of the List entity. The List entity has a to-many relationship with the Task entity (called "tasks"), and the Task entity has an inverse to-one relationship with List called "list". When a List object is selected in the master view, I want the detail view (another UITableView) to list the Task objects that correspond to that List object. What I've done so far is this: In the detail view controller I've declared a property for a List object: @property (nonatomic, retain) List *list; Then in the master view controller I use this table view delegate method to set the list property of the detail view controller when a list is selected: - (void)tableView:(UITableView *)aTableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath { NSManagedObject *selectedObject = [[self fetchedResultsController] objectAtIndexPath:indexPath]; detailViewController.list = (List*)selectedObject; } Then, I've overriden the setter for the list property in the detail view controller like this: - (void)setList:(List*)newList { if (list != newList) { [list release]; list = [newList retain]; NSPredicate *newPredicate = [NSPredicate predicateWithFormat:@"(list == %@)", list]; [NSFetchedResultsController deleteCacheWithName:@"Root"]; [[[self fetchedResultsController] fetchRequest] setPredicate:newPredicate]; NSError *error = nil; if (![[self fetchedResultsController] performFetch:&error]) { NSLog(@"Unresolved error %@, %@", error, [error userInfo]); abort(); } } } What I'm doing here is setting a predicate on the fetched results to filter out the objects so that I only get the ones that belong to the selected List object. The fetchedResultsController getter for the detail view controller looks like this: - (NSFetchedResultsController *)fetchedResultsController { if (fetchedResultsController == nil) { NSFetchRequest *fetchRequest = [[NSFetchRequest alloc] init]; NSEntityDescription *entity = [NSEntityDescription entityForName:@"Task" inManagedObjectContext:managedObjectContext]; [fetchRequest setEntity:entity]; NSPredicate *predicate = [NSPredicate predicateWithFormat:@"FALSEPREDICATE"]; [fetchRequest setPredicate:predicate]; NSSortDescriptor *sortDescriptor = [[NSSortDescriptor alloc] initWithKey:@"name" ascending:YES]; NSArray *sortDescriptors = [[NSArray alloc] initWithObjects:sortDescriptor, nil]; [fetchRequest setSortDescriptors:sortDescriptors]; NSFetchedResultsController *aFetchedResultsController = [[NSFetchedResultsController alloc] initWithFetchRequest:fetchRequest managedObjectContext:managedObjectContext sectionNameKeyPath:nil cacheName:@"Root"]; aFetchedResultsController.delegate = self; self.fetchedResultsController = aFetchedResultsController; [aFetchedResultsController release]; [fetchRequest release]; [sortDescriptor release]; [sortDescriptors release]; } return fetchedResultsController; } Its almost unchanged from the default in the Core Data project template, the change I made is to add a predicate that always returns false, the reason being that when there is no List selected I don't want any items to be displayed in the detail view (if a list is selected the predicate is changed in the setter for the list property). However, when I select a list item, nothing really happens. Nothing in the table view changes, it stays empty. I'm sure my logic is flawed in several places, advice is appreciated Thanks

    Read the article

  • UIViewController not loading a UIView

    - by Cosizzle
    Hey, I'm playing around with a script my teacher provided for a table based application. However I can't seem to get my own view to load. Files: SubViewOneController (which is a sub view, also has a nib) TapViewController (Custom UIView I created and want to add to a cell) RootViewController (Main controller which loads in the views) SimpleNavAppDelegate How it works: Within the RootViewController, there's an NSArray that holds NSDictionary objects which is declared in the -(void)awakeFromNib {} method - (void)awakeFromNib { // we'll keep track of our views controllers in this array views = [[NSMutableArray alloc] init]; // when using alloc you are responsible for it, and you will have to release it. // ==================================================================================================== // ==================================================================================================== // LOADING IN CUSTOM VIEW HERE: // allocate a set of views and add to our view array as a dictionary item TapViewController *tapBoardView = [[TapViewController alloc] init]; //push onto array [views addObject:[NSDictionary dictionaryWithObjectsAndKeys: @"Tab Gestures", @"title", tapBoardView, @"controller", nil]]; [tapBoardView release]; //release the memory // ==================================================================================================== // ==================================================================================================== SubViewOneController *subViewOneController = [[SubViewOneController alloc] init]; // This will set the 2nd level title subViewOneController.title = @"Swipe Gestures"; //set it's title //push it onto the array [views addObject:[NSDictionary dictionaryWithObjectsAndKeys: @"Swipe Gestures", @"title", subViewOneController, @"controller", nil]]; [subViewOneController release]; //release the memory } Later on I set the table view: - (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath { // OUTPUT -- see console NSLog(@"indexPath %i", indexPath.row); // OUTPUT: tapController: <TapViewController: 0x3b2b360> NSLog(@"view object: %@", [views objectAtIndex:indexPath.row]); // OUTPUT: view object: controller = <TapViewController: 0x3b0e290>; title = "Tab Gestures"; // ----- Hardcoding the controller and nib file in does work, so it's not a linkage issue ------ // UNCOMMENT TO SEE WORKING -- comment below section. //TapViewController *tapContoller = [[TapViewController alloc] initWithNibName:@"TapBoardView" bundle:nil]; //NSLog(@"tapController: %@", tapContoller); //[self.navigationController pushViewController:tapContoller animated:YES]; // ----- Random Tests ----- //UIViewController *targetViewController = [[views objectAtIndex: 0] objectForKey:@"controller"]; // DOES NOT WORK // LOADS THE SECOND CELL (SubViewOneController) however will not load (TapViewController) UIViewController *targetViewController = [[views objectAtIndex: indexPath.row] objectForKey:@"controller"]; NSLog(@"target: %@", targetViewController); // OUTPUT: target: <TapViewController: 0x3b0e290> [self.navigationController pushViewController:targetViewController animated:YES]; } Reading the comments you should be able to see that hardcoding the view in, works - however trying to load it from the View NSArray does not work. It does however contain the object in memory, seeing that NSLog proves that. Everything is linked up and working within the TapViewController nib file. So ya, im kinda stuck on this one, any help would be great! Thanks guys

    Read the article

  • UITableView not getting populated

    - by jayshree430
    Hi. I have a peculiar problem. I created a normal Objective c class called SampleTable. I then extended UITableView instead of NSObject. Then in the initWithFrame constructor i initialized the table. I also made a NSMutableArray object for the datasource. I also conformed UITableViewDelegate and UITableViewDatasource. I have overridden the necessary methods also. Now i made an object of this class in another class, and added the object as a subview. The tableView is getting drawn according to the CGRectMake() coordinates i gave to the initWithFrame constructor. But it is not getting populated with the data. I dnt know what the problem is . Can plz someone help me. SampleTable.h #import @interface SampleTable : UITableView { NSMutableArray *ItemArray; } @property (nonatomic,retain) NSMutableArray *ItemArray; -(NSMutableArray *) displayItemArray; @end SampleTable.m #import "SampleTable.h" @implementation SampleTable @synthesize ItemArray; -(id)initWithFrame:(CGRect)frm { [super initWithFrame:frm]; self.delegate=self; self.dataSource=self; [self reloadData]; return self; } -(NSMutableArray *) displayItemArray { if(ItemArray==nil) { ItemArray=[[NSMutableArray alloc] initWithObjects:@"1",@"2",@"3",@"4",@"5",nil]; } return ItemArray; } (NSInteger)numberOfSectionsInTableView:(UITableView *)tableView { return 1; } (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section { return [ItemArray count]; } (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath { static NSString *CellIdentifier = @"Cell"; UITableViewCell *cell= [tableView dequeueReusableCellWithIdentifier:CellIdentifier]; if (cell==nil) { cell = [[UITableViewCell alloc] initWithStyle:UITableViewCellStyleSubtitle reuseIdentifier:CellIdentifier]; [cell autorelease]; } NSString *temp=[self.ItemArray objectAtIndex:indexPath.row]; cell.textLabel.text = temp; return cell; } (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath { NSLog(@"didselect"); } -(void) dealloc { [ItemArray release]; [super dealloc]; } @end

    Read the article

  • Passing a ManagedObjectContext to a second view

    - by amo
    I'm writing my first iPhone/Cocoa app. It has two table views inside a navigation view. When you touch a row in the first table view, you are taken to the second table view. I would like the second view to display records from the CoreData entities related to the row you touched in the first view. I have the CoreData data showing up fine in the first table view. You can touch a row and go to the second table view. I'm able to pass info from the selected object from the first to the second view. But I cannot get the second view to do its own CoreData fetching. For the life of me I cannot get the managedObjectContext object to pass to the second view controller. I don't want to do the lookups in the first view and pass a dictionary because I want to be able to use a search field to refine results in the second view, as well as insert new entries to the CoreData data from there. Here's the function that transitions from the first to the second view. - (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath { // Navigation logic may go here -- for example, create and push another view controller. NSManagedObject *selectedObject = [[self fetchedResultsController] objectAtIndexPath:indexPath]; SecondViewController *secondViewController = [[SecondViewController alloc] initWithNibName:@"SecondView" bundle:nil]; secondViewController.tName = [[selectedObject valueForKey:@"name"] description]; secondViewController.managedObjectContext = [self managedObjectContext]; [self.navigationController pushViewController:secondViewController animated:YES]; [secondViewController release]; } And this is the function inside SecondViewController that crashes: - (void)viewDidLoad { [super viewDidLoad]; self.title = tName; NSError *error; if (![[self fetchedResultsController] performFetch:&error]) { // <-- crashes here // Handle the error... } } - (NSFetchedResultsController *)fetchedResultsController { if (fetchedResultsController != nil) { return fetchedResultsController; } /* Set up the fetched results controller. */ // Create the fetch request for the entity. NSFetchRequest *fetchRequest = [[NSFetchRequest alloc] init]; // Edit the entity name as appropriate. // **** crashes on the next line because managedObjectContext == 0x0 NSEntityDescription *entity = [NSEntityDescription entityForName:@"SecondEntity" inManagedObjectContext:managedObjectContext]; [fetchRequest setEntity:entity]; // <snip> ... more code here from Apple template, never gets executed because of the crashing return fetchedResultsController; } Any ideas on what I am doing wrong here? managedObjectContext is a retained property. UPDATE: I inserted a NSLog([[managedObjectContext registeredObjects] description]); in viewDidLoad and it appears managedObjectContext is being passed just fine. Still crashing, though. Terminating app due to uncaught exception 'NSInternalInconsistencyException', reason: '+entityForName: could not locate an NSManagedObjectModel for entity name 'SecondEntity''

    Read the article

  • TableView frame not resizing properly when pushing a new view controller and the keyboard is hiding

    - by Pete
    Hi, I must be missing something fundamental here. I have a UITableView inside of a NavigationViewController. When a table row is selected in the UITableView (using tableView:didSelectRowAtIndexPath:) I call pushViewController to display a different view controller. The new view controller appears correctly, but when I pop that view controller and return the UITableView is resized as if the keyboard was being displayed. I need to find a way to have the keyboard hide before I push the view controller so that the frame is restored correctly. If I comment out the code to push the view controller then the keyboard hides correctly and the frame resizes correctly. The code I use to show the keyboard is as follows: - (void) keyboardDidShowNotification:(NSNotification *)inNotification { NSLog(@"Keyboard Show"); if (keyboardVisible) return; // We now resize the view accordingly to accomodate the keyboard being visible keyboardVisible = YES; CGRect bounds = [[[inNotification userInfo] objectForKey:UIKeyboardFrameBeginUserInfoKey] CGRectValue]; bounds = [self.view convertRect:bounds fromView:nil]; CGRect tableFrame = tableViewNewEntry.frame; tableFrame.size.height -= bounds.size.height; // subtract the keyboard height if (self.tabBarController != nil) { tableFrame.size.height += 48; // add the tab bar height } [UIView beginAnimations:nil context:NULL]; [UIView setAnimationDelegate:self]; [UIView setAnimationDidStopSelector:@selector(shrinkDidEnd:finished:contextInfo:)]; tableViewNewEntry.frame = tableFrame; [UIView commitAnimations]; } The keyboard is hidden using: - (void) keyboardWillHideNotification:(NSNotification *)inNotification { if (!keyboardVisible) return; NSLog(@"Keyboard Hide"); keyboardVisible = FALSE; CGRect bounds = [[[inNotification userInfo] objectForKey:UIKeyboardFrameBeginUserInfoKey] CGRectValue]; bounds = [self.view convertRect:bounds fromView:nil]; CGRect tableFrame = tableViewNewEntry.frame; tableFrame.size.height += bounds.size.height; // add the keyboard height if (self.tabBarController != nil) { tableFrame.size.height -= 48; // subtract the tab bar height } tableViewNewEntry.frame = tableFrame; [UIView beginAnimations:nil context:NULL]; [UIView setAnimationDelegate:self]; [UIView setAnimationDidStopSelector:@selector(_shrinkDidEnd:finished:contextInfo:)]; tableViewNewEntry.frame = tableFrame; [UIView commitAnimations]; [tableViewNewEntry scrollToNearestSelectedRowAtScrollPosition:UITableViewScrollPositionMiddle animated:YES]; NSLog(@"Keyboard Hide Finished"); } I trigger the keyboard being hidden by resigning first responser for any control that is the first responder in ViewWillDisappear. I have added NSLog statements and see things happening in the log file as follows: Show Keyboard ViewWillDisappear: Hiding Keyboard Hide Keyboard Keyboard Hide Finished PushViewController (an NSLog entry at the point I push the new view controller) From this trace, I can see things happening in the right order, but It seems like when the view controller is pushed that the keyboard hide code does not execute properly. Any ideas would be really appreciated. I have been banging my head against the keyboard for a while trying to find out what I am doing wrong.

    Read the article

  • Flipping PDF pages in QuartzDemo application

    - by BittenApple
    I am working on modifying the quartzdemo application so that it can show another page from a multipage pdf on tap screen event. So far I have stripped it down to the point where it displays the PDF on any page as initial page, but I can't seem to get it figured out how to make the quartzview display anything else then the initial page. I'm guessing that the pushViewController has something to do with this. Anyway, here's my method that draws the initial page and in sits in QuartzImages.m file: -(void)drawNewPage:(CGContextRef)myContext { CGContextTranslateCTM(myContext, 0.0, self.bounds.size.height); CGContextScaleCTM(myContext, 1.0, -1.0); CGContextSetRGBFillColor(myContext, 255, 255, 255, 1); CGContextFillRect(myContext, CGRectMake(0, 0, 320, 412)); CGPDFPageRef page = CGPDFDocumentGetPage(pdfFajl, pageNumber); CGContextSaveGState(myContext); CGAffineTransform pdfTransform = CGPDFPageGetDrawingTransform(page, kCGPDFCropBox, self.bounds, 0, true); CGContextConcatCTM(myContext, pdfTransform); CGContextDrawPDFPage(myContext, page); CGContextRestoreGState(myContext); } This gets fired up in MainViewController.m so: - (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath { // ### DISPLAY DESIRED PAGE QuartzViewController *targetViewController = [self controllerAtIndexPath:indexPath]; if ([targetViewController.quartzView isKindOfClass:[QuartzPDFView1 class]]) { ((QuartzPDFView1 *)targetViewController.quartzView).pageNumber = 1; CFURLRef pdfURL = CFBundleCopyResourceURL(CFBundleGetMainBundle(), CFSTR("mypdftest.pdf"), NULL, NULL); ((QuartzPDFView1 *)targetViewController.quartzView).pdfFajl = CGPDFDocumentCreateWithURL((CFURLRef)pdfURL); CFRelease(pdfURL); } [[self navigationController] pushViewController:targetViewController animated:YES]; } Since I'm fairly new to the iPhone development (I'm currently only on page 123 in "beginning iphone 3 development" book) these controllers confuse me as hell. I have setup an event which gets fired up fine on screen tap. The event sits in QuartzView.m and I get a simple alert on screen tap showing that the tap was registered. I would like to use this method to draw a new page instead of showing the alert, page number doesn't matter, I'll work on incrementing (page flipping) later, I need an example of how to call these methods (if its even possible). These are defined in QuartzView.h and I planned on using them in the tap event method: CGPDFDocumentRef pdfFajl; int pageNumber; Thankful for any useful input from "the internets" :)

    Read the article

  • Trying to retrieve the contents of UITableView cell on selection by user.

    - by chubsta
    Hi, this is my first post here and as i am very new (2 weeks in...) to iPhone (or any!) development i am a little unsure as to how much detail is needed or relevant, so please forgive me if I dont provide enough to be useful at this stage... Anyway, on to my problem - I have set up a UITableView-based app, which has a .plist for holding the data. The .plist has a dictionary as its root, followed by a number of Arrays, each containing the data-strings that display in the table. Everything is working fine until the point where i select a row. I have set it up so i get an alert with the results of the button press and it is here that i want to see the contents of the cell being produced. Instead of the expected string eg. "data line 1", all i get is the number of the row within the section. I have gone backwards and forwards but dont seem to be getting anywhere although i am sure it is something simple. The code compiles fine, with no warnings or errors, and if i can just get the string of the selected cell i will be well on my way, so any help appreciated. I know that I need to do more following the 'NSUInteger row = [indexPath row]; part but thats where my mind dries up... here is the relevant 'selection' section, if i need to post more code please let me know, and i really appreciate any help with this...(please forgive my 'alert' message, i was just happy at that point that i get SOMETHING back from the row selection!) (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath { [tableView deselectRowAtIndexPath:indexPath animated:YES]; NSUInteger row = [indexPath row]; NSString *message = [[NSString alloc] initWithFormat: @"You selected Cell %d from this Section, "@"which is a very good choice indeed!" @"Unfortunately I can't work out how to get the info out of the cell so it's not much use at the moment!" @"Still, this is a good chance to see how much space I have in an alert box!", row]; UIAlertView *alert = [[UIAlertView alloc] initWithTitle:@"My God! It works..." message:message delegate:nil cancelButtonTitle:@"You are awesome Karl!!" otherButtonTitles:nil]; [alert show]; [message release]; [alert release]; }

    Read the article

  • NSMutableArray can't be added to

    - by Dan Ray
    I've had this sort of problem before, and it didn't get a satisfactory answer. I have a viewcontroller with a property called "counties" that is an NSMutableArray. I'm going to drill down a navigation screen to a view that is about selecting the counties for a geographical search. So the search page drills down to the "select counties" page. I pass NSMutableArray *counties to the second controller as I push the second one on the navigation stack. I actually set that second controller's "selectedCounties" property (also an NSMutableArray) with a pointer to my first controller's "counties", as you'll see below. When I go to addObject to that, though, I get this: *** Terminating app due to uncaught exception 'NSInternalInconsistencyException', reason: '*** -[NSCFArray insertObject:atIndex:]: mutating method sent to immutable object' Here's my code: in SearchViewController.h: @interface SearchViewController : UIViewController { .... NSMutableArray *counties; } .... @property (nonatomic, retain) NSMutableArray *counties; in SearchViewController.m: - (void)getLocationsView { [keywordField resignFirstResponder]; SearchLocationsViewController *locationsController = [[SearchLocationsViewController alloc] initWithNibName:@"SearchLocationsView" bundle:nil]; [self.navigationController pushViewController:locationsController animated:YES]; [locationsController setSelectedCounties:self.counties]; [locationsController release]; } in SearchLocationsViewController.h: @interface EventsSearchLocationsViewController : UIViewController <UITableViewDelegate, UITableViewDataSource> { ... NSMutableArray *selectedCounties; } ... @property (nonatomic, retain) NSMutableArray *selectedCounties; in SearchLocationsViewController.m (the point here is, we're toggling each element of a table being active or not in the list of selected counties): -(void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath { UITableViewCell *cell = [tableView cellForRowAtIndexPath:indexPath]; if ([self.selectedCounties containsObject:[self.counties objectAtIndex:indexPath.row]]) { //we're deselcting! [self.selectedCounties removeObject:[self.counties objectAtIndex:indexPath.row]]; cell.accessoryView = [[UIImageView alloc] initWithImage:[UIImage imageNamed:@"red_check_inactive.png"]]; } else { [self.selectedCounties addObject:[self.counties objectAtIndex:indexPath.row]]; cell.accessoryView = [[UIImageView alloc] initWithImage:[UIImage imageNamed:@"red_check_active.png"]]; } [tableView deselectRowAtIndexPath:indexPath animated:YES]; } We die at [self.selectedCounties addObject.... there. Now, when I NSLog myself [self.selectedCounties class], it tells me it's an NSCFArray. How does this happen? I understand about class bundles (or I THINK I do anyway), but this is explicitly a specific type, and it's losing it subclassing at some point in a way that kills the whole thing. I just completely don't understand why that would happen.

    Read the article

< Previous Page | 3 4 5 6 7 8 9  | Next Page >