Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6722817
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T09:29:35+00:00 2026-05-26T09:29:35+00:00

I have problems entering a next view in the TableViewController. When I click on

  • 0

I have problems entering a next view in the TableViewController.
When I click on the cells i see the NSLog-text, but there is no action and no second view.
This means the program enter the methods but does nothing. What is my fault?
I am testing around without getting any solution.

- (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath {

    if (indexPath.row==0) {
        NSLog(@"Index 0");
        AudioViewController *audioviewcontroller = [[AudioViewController alloc] initWithNibName:@"AudioViewController" bundle:nil];
        [self.navController pushViewController:audioviewcontroller animated:YES];
        [audioviewcontroller release];
        [tableView deselectRowAtIndexPath: indexPath animated:YES];

    }
    if (indexPath.row==1) {
        NSLog(@"Index 1");
        DisplayViewController *displayviewcontroller = [[DisplayViewController alloc] initWithNibName:@"DisplayViewController" bundle:nil];
        [self.navController pushViewController:displayviewcontroller animated:YES];
        [displayviewcontroller release];
        [tableView deselectRowAtIndexPath: indexPath animated:YES];
    }
    if (indexPath.row==2) {
        LichtViewController *lichtviewcontroller = [[LichtViewController alloc] initWithNibName:@"LichtViewController" bundle:nil];
        [self.navController pushViewController:lichtViewController animated:YES];
        [lichtviewcontroller release];
        [tableView deselectRowAtIndexPath: indexPath animated:YES];
        NSLog(@"Index 2");
    }
    if (indexPath.row==3) {
        NSLog(@"Index 3");
        ProjektorViewController *projektorviewcontroller = [[ProjektorViewController alloc] initWithNibName:@"ProjektorViewController" bundle:nil];
        [self.navController pushViewController:projektorviewcontroller animated:YES];
        [tableView deselectRowAtIndexPath: indexPath animated:YES];
        [projektorviewcontroller release];

    }
}

Moreover I tried this code:

UIView *currentView = self.view;    
UIView *theWindow = [currentView superview];
[currentView removeFromSuperview];      
UIView* audioView= audioviewcontroller.view;        
[theWindow addSubview:audioView];       
[self.navController pushViewController:audioviewcontroller animated:YES];       [audioviewcontroller release];
[tableView deselectRowAtIndexPath: indexPath animated:YES]; 

I get no warning but a crash and the debugger console shows:

2011-10-26 10:01:59.344 subview[971:207] -[__NSCFTimer numberOfSectionsInTableView:]: unrecognized selector sent to instance 0x4b44880
2011-10-26 10:01:59.346 subview[971:207] *** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '-[__NSCFTimer numberOfSectionsInTableView:]: unrecognized selector sent to instance 0x4b44880'
*** Call stack at first throw:
(
    0   CoreFoundation                      0x00dcf5a9 __exceptionPreprocess + 185
    1   libobjc.A.dylib                     0x00f23313 objc_exception_throw + 44
    2   CoreFoundation                      0x00dd10bb -[NSObject(NSObject) doesNotRecognizeSelector:] + 187
    3   CoreFoundation                      0x00d40966 ___forwarding___ + 966
    4   CoreFoundation                      0x00d40522 _CF_forwarding_prep_0 + 50
    5   UIKit                               0x0047a6ff -[UITableViewRowData(UITableViewRowDataPrivate) _updateNumSections] + 111
    6   UIKit                               0x0047a3b0 -[UITableViewRowData invalidateAllSections] + 66
    7   UIKit                               0x00331d23 -[UITableView(_UITableViewPrivate) _updateRowData] + 113
    8   UIKit                               0x0032d65c -[UITableView noteNumberOfRowsChanged] + 105
    9   UIKit                               0x0033a708 -[UITableView reloadData] + 773
    10  UIKit                               0x00337844 -[UITableView layoutSubviews] + 42
    11  QuartzCore                          0x01d6fa5a -[CALayer layoutSublayers] + 181
    12  QuartzCore                          0x01d71ddc CALayerLayoutIfNeeded + 220
    13  QuartzCore                          0x01d170b4 _ZN2CA7Context18commit_transactionEPNS_11TransactionE + 310
    14  QuartzCore                          0x01d18294 _ZN2CA11Transaction6commitEv + 292
    15  QuartzCore                          0x01d1846d _ZN2CA11Transaction17observer_callbackEP19__CFRunLoopObservermPv + 99
    16  CoreFoundation                      0x00db089b __CFRUNLOOP_IS_CALLING_OUT_TO_AN_OBSERVER_CALLBACK_FUNCTION__ + 27
    17  CoreFoundation                      0x00d456e7 __CFRunLoopDoObservers + 295
    18  CoreFoundation                      0x00d0e1d7 __CFRunLoopRun + 1575
    19  CoreFoundation                      0x00d0d840 CFRunLoopRunSpecific + 208
    20  CoreFoundation                      0x00d0d761 CFRunLoopRunInMode + 97
    21  GraphicsServices                    0x017261c4 GSEventRunModal + 217
    22  GraphicsServices                    0x01726289 GSEventRun + 115
    23  UIKit                               0x002cdc93 UIApplicationMain + 1160
    24  subview                             0x000023b4 main + 102
    25  subview                             0x00002345 start + 53
    26  ???                                 0x00000001 0x0 + 1
)
terminate called after throwing an instance of 'NSException'

Thank you for help in advance

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-26T09:29:36+00:00Added an answer on May 26, 2026 at 9:29 am

    Try the codes below if it works for you, this is how I declare my objects/variables in the tableView didSelectRowAtIndexPath. Declare your object (views) at the top of the function

    - (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath {
    
     AudioViewController *audioviewcontroller = [[AudioViewController alloc] initWithNibName:@"AudioViewController" bundle:nil];
     DisplayViewController *displayviewcontroller = [[DisplayViewController alloc] initWithNibName:@"DisplayViewController" bundle:nil];
     LichtViewController *lichtviewcontroller = [[LichtViewController alloc] initWithNibName:@"LichtViewController" bundle:nil];
     ProjektorViewController *projektorviewcontroller = [[ProjektorViewController alloc] initWithNibName:@"ProjektorViewController" bundle:nil];
    
     if (indexPath.row==0) {
        NSLog(@"Index 0");
        [self.navController pushViewController:audioviewcontroller animated:YES];
        [audioviewcontroller release];
        [tableView deselectRowAtIndexPath: indexPath animated:YES];
     }
     if (indexPath.row==1) {
        NSLog(@"Index 1");
        [self.navController pushViewController:displayviewcontroller animated:YES];
        [displayviewcontroller release];
        [tableView deselectRowAtIndexPath: indexPath animated:YES];
     }
     if (indexPath.row==2) {
        [self.navController pushViewController:lichtViewController animated:YES];
        [lichtviewcontroller release];
        [tableView deselectRowAtIndexPath: indexPath animated:YES];
        NSLog(@"Index 2");
     }
     if (indexPath.row==3) {
        NSLog(@"Index 3");
        [self.navController pushViewController:projektorviewcontroller animated:YES];
        [tableView deselectRowAtIndexPath: indexPath animated:YES];
        [projektorviewcontroller release];
    
     }
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have one asp.net application, which has some problems while i am entering the
So I thought I'd teach myself C++ but I appear to have no problems
I have created one keyboard.When user enter numbers , its entering particular EditText.But When
I have problems adding a custom validation to validate fields entering time (with jQuery
I have problems with bringing a windows mobile 6 form to the front. I
I have problems binding both a telerik RadGrid and a plain vanilla ASP.NET GridView
I have problems with how I should structure my product listing pages, products pages,
I have problems with dealing with widows within a multicols environment, that is, I
I have problems to get rspec running properly to test validates_inclusion_of my migration looks
I have problems getting some of my views aligned in a relative layout that

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.