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

  • Home
  • SEARCH
  • 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 7996887
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 4, 20262026-06-04T14:49:21+00:00 2026-06-04T14:49:21+00:00

Here is what I already have; I have loaded a Custom cell from XIB

  • 0

Here is what I already have;

  • I have loaded a Custom cell from XIB file (UITableViewCell)
  • This custom cell contains Button A and B
  • Created a IBAction to handle Button A
  • loaded above XIB file in MyTableView class (UIViewController)

Now I want to load another view(Most probably a XIB file) on Button A clicked event, in IBAction function I have tried this;

    // Where MyTableView is a class which loads this custom cell
    // ModalView is a name of XIB File
    MyTableView *vc = [[MyTableView alloc] initWithNibName:@"ModalView" bundle:nil];
    [self.navigationController pushViewController:vc animated:YES];

but it throughs error at “self.navigationController”, says Property navigationController not found on object of type MyTableViewCell class, i know this is happening due to the UITableViewCell class and the self in this line is referring to the UIViewController Object and I should use awakeFromNib or something like that, but I couldn’t find any sufficient example to let me achieve what I need.

  • 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-06-04T14:49:23+00:00Added an answer on June 4, 2026 at 2:49 pm

    ok, I have solved my problem;

    In cellForRowAtIndexPath function, where I was fetching the XIB file (UITableViewCell) to represent a custom designed cell, I created a button and assign it the button from the XIB view and then attached the IBAction to it;

        // SimpleTableCell is the XIB filename (UITableViewCell)
        NSArray *nib = [[NSBundle mainBundle] loadNibNamed:@"SimpleTableCell" owner:self options:nil];
            cell = [nib objectAtIndex:0];
    
    
        UIButton *btn = [[UIButton alloc] init];
        btn = cell.btn;
        [btn addTarget:self action:@selector(smsBtnClicked:) 
                                forControlEvents:UIControlEventTouchUpInside];
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have this code just to send data from already loaded jqGrid: jQuery(#bedata).click(function(){ //Function
There have been many debates about this topic already here, but none of them
I have a UITableView that uses custom cells, loaded from nibs, and hooked up
I googled,I binged,I already have seen the other duplicates here,but none of them work
I have an almost new setup of ROR 3.1 here and have already generated
I have seen the related question here: An object with the same key already
There's a question on this already (here) . But I'm hoping that because I'm
I expect the answer to this is already here someplace, but I was not
First days dealing with Perl and blocked already :) Here's the situation: a file
I haven't found this question, feel free to close if it's already up here.

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.