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 6756351
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T13:30:50+00:00 2026-05-26T13:30:50+00:00

So I thought I’d have a go at building my own simple app. Please

  • 0

So I thought I’d have a go at building my own simple app. Please go easy on me I’m new to all this! The idea is this. For iPad have a single view controller with a text box and a text field. Text box takes a title, and text field takes the body of a report. There’s a button on the page to submit the report, which bundles the two texts into an object and adds it to a table view within the same view controller. I have set the view controller as a delegate with <UITableViewDelegate, UITableViewDataSource> in my header file. My table view works fine for adding items in the viewDidLoad method. But adding items from the text inputs via a UIButton connected to -(IBAction) addItem falls over with: Property 'tableView' not found on object of type 'ReportsViewController'

- (IBAction)addReportItem
{
int newRowIndex = [reports count];

ReportObject *item = [[ReportObject alloc] init];
item.title = @"A new title";
item.reportText = @"A new text";
[reports addObject:item];

NSIndexPath *indexPath = [NSIndexPath indexPathForRow:newRowIndex inSection:0];
NSArray *indexPaths = [NSArray arrayWithObject:indexPath];
[self.tableView insertRowsAtIndexPaths:indexPaths   withRowAnimation:UITableViewRowAnimationAutomatic];
}

I understand that I’m trying to call a method within my object but I have other method calls to tableView which work fine. i.e.

- (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section
{
    return [reports count];
}

I thought this was the point of delegation. I know I’m missing something, but as I say I am new to all this and have looked everywhere for an answer before posting. What do I need to do to send my IBAction message to tableView?

  • 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-26T13:30:50+00:00Added an answer on May 26, 2026 at 1:30 pm

    Do you have a tableView instance variable setup in your .h file of the view controller?

    The reason you are able to access it in the delegate and data source methods is because they are passed in as part if the methods.

    You will need to add the IBOUTLET tableView ivar and connect it to the tableView in your .xib.

    Or perhaps your ivar for the tableView is named something else?

    Good luck.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I thought this would be really easy but I can't find a simple solution,
I thought this would be fairly easy, but I'm totally baffled. I want one
Never thought I'd have this problem :) The following snippet of code works in
I thought this would be easy, but after scanning many pages Google hasn't come
I thought this would be a simple thing to do with a native php
I thought I had this figured out, but can't get it working correctly: All
Thought is was time to bring this to the Stack. We have IIS 7.5
I thought I could figure this out on my own, but apparently I am
I thought that would have been simple but it is not working. I can,
I thought this would be simple enough but somethings wrong. The only Bootstrap gem

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.