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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 18, 20262026-05-18T02:03:59+00:00 2026-05-18T02:03:59+00:00

I have a table view, with an added headerview created in IB to display

  • 0

I have a table view, with an added headerview created in IB to display some text above the table (couldn’t post the screenshot- http://i51.tinypic.com/2przbl5.jpg). I would like to load the text above the table based on my plist and I am using objectforkey to load the text. However when I connect the outlets in IB the text disappears. This worked in a standard UIview so I’m not sure what I’m missing in the table view. I’m new to coding so perhaps there a better way to do this or what am i doing wrong? thanks.

.h file _________________________________________________


#import <UIKit/UIKit.h>
@interface TourOverviewController : UITableViewController {

 NSArray *points;
 NSDictionary *tour;
 IBOutlet UITextField *nameTextField;
 IBOutlet UITextView *pointsTextView;
}

@property (nonatomic, retain) NSArray *points;
@property (nonatomic, retain) NSDictionary *tour;
@property (nonatomic, retain) UITextField *nameTextField;
@property (nonatomic, retain) UITextView *pointsTextView;


@end

.m file______________________________________________________

    #import "TourOverviewController.h"
#import "LoadingNames.h"

@implementation TourOverviewController
@synthesize points, tour, nameTextField, pointsTextView, 

- (void) viewWillAppear:(BOOL)animated {
 [super viewWillAppear:animated];

 nameTextField.text = [tour objectForKey:NAME_KEY];
 pointsTextView.text = [tour objectForKey:DIRECTIONS_KEY];  
}


- (void)viewDidLoad { 
 NSArray *array = [[NSArray alloc] initWithObjects:@"Toy Story",
                      @"A Bug's Life", @"Toy Story 2", @"Monsters, Inc.", 
                      @"Finding Nemo", @"The Incredibles", @"Cars", 
                      @"Ratatouille", @"WALL-E", nil];
    self.points = array;
    [array release];
    [super viewDidLoad];
}
- (NSInteger)numberOfSectionsInTableView:(UITableView *)tableView {
    // Return the number of sections.
    return 1;
}


- (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section {
    // Return the number of rows in the section.
    return [points count];
}


// Customize the appearance of table view cells.
- (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] autorelease];
    }

    NSUInteger row = [indexPath row];
    NSString *rowString = [points objectAtIndex:row];
    cell.textLabel.text = rowString;
    cell.accessoryType = UITableViewCellAccessoryDisclosureIndicator;
    [rowString release];

    return cell;
}

@end
  • 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-18T02:04:00+00:00Added an answer on May 18, 2026 at 2:04 am

    Im not sure I understand your question but you could create 2 plists, points and tour and then fill your Mutable array and dictionary with the contents of the plist.

    EDIT****************************

    I missed this before, but maybe it as simple as adding a @” ” e.g.

    [tour objectForKey:@"NAME_KEY"];
    

    You should make your array and dictionary mutable if you want to change the data within them for whatever reason.

    Here is so code to get the plist and fill your array or dictionary(be sure to set the plists to the appropriate type when you fill them)

    Put this in your viewDidLoad method

    NSString *pointsList = [[NSBundle mainBundle] 
      pathForResource:@"points" ofType:@"plist"];
      points = [[NSMutableArray alloc]initWithContentsOfFile: pointsList];
    
    NSString *tourList = [[NSBundle mainBundle] 
      pathForResource:@"tour" ofType:@"plist"];
      tour = [[NSMutableArray alloc]initWithContentsOfFile: tourList];
    

    Then you have your array and dictionary filled with the contents of the plist.

    Hope this helps, maybe I misunderstood want you want to do.

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

Sidebar

Related Questions

I have a table view controller with custom cells. In those cells i added
In my iPhone application I have a table view. When user taps any row,
Here's my case: I have a table view showing contacts. Add button in the
I have a grouped table view with textfields in the tableview. For the keyboard
I have a name of table or view in PostgreSQL database and need to
I have a situation where I build a view with a table and another
I have a table view that displays managed objects (Tasks). I'd like to fetch
I have a table view which i want to populate with the results (XML)
I have a table view and when I drop something on it, I get
I've have a table view that consist of item list that depends on the

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.