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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 8, 20262026-06-08T08:52:00+00:00 2026-06-08T08:52:00+00:00

-(IBAction)btnSaveScore:(id)sender { if(!dictWinData) dictWinData = [[NSMutableDictionary alloc] init]; array = [NSMutableArray arrayWithObjects:txt_EnterName.text, [NSString stringWithFormat:@%i,iTap],

  • 0
-(IBAction)btnSaveScore:(id)sender
{
   if(!dictWinData)
      dictWinData = [[NSMutableDictionary alloc] init];


    array = [NSMutableArray arrayWithObjects:txt_EnterName.text,
                                             [NSString stringWithFormat:@"%i",iTap], nil];

    int increment = 0;

    NSLog(@"array data is:--> %@",array);

    for (int intWinData = 1; intWinData < [array count]; intWinData++)
    {
        [dictWinData setObject:array forKey:[NSString stringWithFormat:@"NameScore%d",increment]];
        increment++;
    }
}

This is the code to add my score of the game with name.

- (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section
{
    return [dictWinData 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] autorelease];

        ArrStr = [dictWinData valueForKey:[NSString stringWithFormat:@"NameScore%d",indexPath.row]];
        UILabel *lblDayName = [[UILabel alloc] initWithFrame:CGRectMake(10, 50, 160, 21)];
        lblDayName.text = [ArrStr objectAtIndex:0];
        lblDayName.textColor = [UIColor blackColor];
        lblDayName.font = [UIFont boldSystemFontOfSize:17.0];
        lblDayName.backgroundColor = [UIColor clearColor];
        [cell.contentView addSubview:lblDayName];
        [lblDayName release];

        UILabel *lblLow = [[UILabel alloc] initWithFrame:CGRectMake(180, 50, 40, 21)];
        lblLow.text = [ArrStr objectAtIndex:1];
        lblLow.textColor = [UIColor blackColor];
        lblLow.font = [UIFont boldSystemFontOfSize:17.0];
        lblLow.backgroundColor = [UIColor clearColor];
        [cell.contentView addSubview:lblLow];
        [lblLow release];
    }
return cell;
}

This is storing name & score of the player but each time it displays only one record in the table.

It must show the last top ten scores in the list.

Main problem is that this is not storing & showing every score data.

Please guide me to solve this problem.

Thanks 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-06-08T08:52:03+00:00Added an answer on June 8, 2026 at 8:52 am

    You cannot use table view for storing data. Table view is an UI Element which can be used for display your data. UITableView reference.
    For storing data you can use:

    1. Core data
    2. Sqlite
    3. Plist
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

- (IBAction)EnterButtonPressed:(id)sender { Sqlite *sqlite = [[Sqlite alloc] init]; NSArray *paths =NSSearchPathForDirectoriesInDomains(NSDocumentDirectory,NSUserDomainMask, YES); NSString
- (IBAction)SetupButtonPressed:(id)sender { Sqlite *sqlite = [[Sqlite alloc] init]; NSString *writableDBPath = [[NSBundle mainBundle]pathForResource:@MoneyofType:@sqlite];
-(IBAction)Done :(id) sender { NSMutableArray *addinfo = [[NSMutableArray alloc]init]; AddinfoCarteV *addinfoCarteV =[[AddinfoCarteV alloc]initWithNibName:@AddinfoCarteV bundle:nil];
- (IBAction)doUpload:(id)sender { NSMutableArray *selected_items = [[NSMutableArray alloc] init]; for (int i = 0;
I have this code : -(IBAction)OkButtonPressed:(id)sender{ NSLog(@BTN OK); RecherchePartenaireTableView *recherchePartenaireTableView=[[RecherchePartenaireTableView alloc]init]; recherchePartenaireTableView.mytext=textFieldCode.text; [self.navigationController popViewControllerAnimated:YES];
I have this code: - (IBAction) checkIt:(id)sender{ NSString *button = [[(UIImageView *)sender label]text]; I
-(IBAction)selectPressed:(id)sender { UIImagePickerController *picker = [[UIImagePickerController alloc] init]; picker.delegate = self; picker.sourceType = UIImagePickerControllerSourceTypePhotoLibrary;
-(IBAction)musiconButtonClicked:(id)sender{ NSString *path = [[NSBundle mainBundle] pathForResource:@NextRevIt ofType:@mp3]; AVAudioPlayer* audioPlayer = [[AVAudioPlayer alloc ]
I have this code -(IBAction) generateFlashNow:(id)sender{ [textField resignFirstResponder]; NSString *string1 = textField.text; //NSString *string2
Here is the code: -(IBAction)customButtonPressed:(id)sender { NSString *text = Field.text; //label is called Label

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.