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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 30, 20262026-05-30T11:40:31+00:00 2026-05-30T11:40:31+00:00

I need to take this data structure, an nsmutablearray, and iterate through each index

  • 0

I need to take this data structure, an nsmutablearray, and iterate through each index and print each field into a textfield. every “forward” button increments the data ahead and “backwards” goes back. I am having a really hard time getting this to work properly, does anyone know what im doing wrong. Keep in mind, the object held in the array, called info_holder, is an object that holds 3 strings and one counter:

#import "ZDViewController.h"

@implementation ZDViewController
@synthesize password;
@synthesize count;
@synthesize web;
@synthesize username;
@synthesize header;

- (void)didReceiveMemoryWarning
{
    [super didReceiveMemoryWarning];
}

#pragma mark - View lifecycle

- (void)viewDidLoad
{
    [super viewDidLoad];
    NSMutableArray *array = [[NSMutableArray alloc] init];
    info_holder *set1 = [[info_holder alloc] init];
    info_holder *set2 = [[info_holder alloc] init];
    info_holder *set3 = [[info_holder alloc] init];
    info_holder *set4 = [[info_holder alloc] init];
    info_holder *set5 = [[info_holder alloc] init];
    [set1 SetUser: @"info1"]; //temporary information until big is fixed
    [set1 SetPass: @"info2"];
    [set1 SetKey: @"webinfo1"];
    [set1 SetCount: 0];
    [set2 SetUser: @"info3"];
    [set2 SetPass: @"info4"];
    [set2 SetKey: @"webinfo2"];
    [set2 SetCount: 0];
    [set3 SetUser: @"info5"];
    [set3 SetPass: @"info6"];
    [set3 SetKey: @"webinfo3"];
    [set3 SetCount: 0];
    [set4 SetUser: @"info7"];
    [set4 SetPass: @"info8"];
    [set4 SetKey: @"webinfo4"];
    [set4 SetCount: 0];
    [set5 SetUser: @"info9"];
    [set5 SetPass: @"info10"];
    [set5 SetKey: @"Webinfo5"];
    [set5 SetCount: 0];

}

- (void)viewDidUnload
{
    [self setHeader:nil];
    [self setWeb:nil];
    [self setPassword:nil];
    [self setCount:nil];
    [self setUsername:nil];
    [super viewDidUnload];
}

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

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

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

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

- (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation
{
    return (interfaceOrientation != UIInterfaceOrientationPortraitUpsideDown);
}

- (IBAction)increment:(id)sender {
    if(username.text==@"test")
        username.text=@"test2";
    else
        username.text=@"test";
    //this should print a new username NSSTRING, wedsite NSTRING, password NSTRING and INEGER counter, heald in the info_holder object, incremented per click backwards 
}

- (IBAction)decrement:(id)sender {

}
- (IBAction)Inc:(id)sender {

}
- (IBAction)textFieldDoneEditing:(id)sender {
    [sender resignFirstResponder];
}
- (IBAction)backgroundTap:(id)sender {
    [web resignFirstResponder];
    [username resignFirstResponder];
    [count resignFirstResponder];
    [password resignFirstResponder];
}
@end

and my main is:

#import <UIKit/UIKit.h>

#import "ZDAppDelegate.h"
#import "info_holder.h"

int main(int argc, char *argv[])
{
    @autoreleasepool {

        return UIApplicationMain(argc, argv, nil, NSStringFromClass([ZDAppDelegate class]));
    }
}
  • 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-30T11:40:32+00:00Added an answer on May 30, 2026 at 11:40 am
    - (IBAction)forwards:(id)sender {
        //this should print a new username NSSTRING, wedsite NSTRING, password NSTRING and INEGER counter, heald in the info_holder object, incremented per click forward
    for(int i=0;i<your_array.count;i++){
        username.text=[your_array objectAtIndex:i];
        password.text=[your_array objectAtIndex:i];
        key.text.text=[your_array objectAtIndex:i];
    
    
    }
    }
    

    Note-1: I assume your texrfield names as username, password and key

    Note-2: Your question is too long an i think no one will read so many code to find your matter. Just share what you need .

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

Sidebar

Related Questions

I need to take a csv file and import this data into a multi-dimensional
I need some help adding conditions to a linq query. Take this small example
I'm baffled how to do this. I need to take a datetime object and
This is my first post here. I have a problem. I need to take
It would take too long to explain why I need this, but I was
I need to take production data with real customer info (names, address, phone numbers,
I need an efficient data structure to store a list of integers. The amount
I need a collection data-structure that can do the following: Be sorted Allow me
I'm having a bit of a hard time. Essentially I need a data structure
I have a tree data structure that is L levels deep each node has

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.