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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 5, 20262026-06-05T16:36:04+00:00 2026-06-05T16:36:04+00:00

i have an error in this code NSString *str = @above string; //load above

  • 0

i have an error in this code

NSString *str = @"above string"; //load above string here
NSArray * firstArry = [str componentsSeparatedByString:@"#"];
NSMutableArray *secondArry = [[NSMutableArray alloc] init]; //Will hold the # titles
NSMutableDictionary *dict = [[NSMutableDictionary alloc] init]; //Will hold the strings related to # title
for(NSString firstArryStr : firstArry)
{
    NSArray *tempArry = [firstArryStr componentsSeparatedByString@"\n"];
    NSMutableArray *titleStingsArry = [[NSMutableArray alloc] init];
    for (int i=0; i< [tempArry count];i++)
    {
        if (i==0)
        {
            NSString *title = [tempArry  objectAtIndex:i];
            [secondArry addObject:title];
            [dict setValue:titleStingsArry  forKey:title];
        } else {
            [titleStingsArry  addObject:[tempArry  objectAtIndex:i]];
        }
    } 
 }

the error is on the first “for”.

this is a code to handle that :

# 2012
20120604 Huge Sandstorm over Saudi Arabia
20120527 Huge Sandstorm over niger
# 2012
20110330 Huge Sandstorm over niger
# just for the test
20110330 AHuge Sandstorm over niger
20110330 BHuge Sandstorm over niger
20110330 CHuge Sandstorm over niger
20110330 1Huge Sandstorm over niger
20110330 2Huge Sandstorm over niger
20110330 3Huge Sandstorm over niger
20110330 4Huge Sandstorm over niger
20110330 5CHuge Sandstorm over niger
20110330 6Huge Sandstorm over niger
# **********
20110330 7Huge Sandstorm over niger
20110330 8Huge Sandstorm over niger
20110330 9CHuge Sandstorm over niger
20110330 AHuge Sandstorm over niger
20110330 B10CHuge Sandstorm over niger
20110330 **CHuge Sandstorm over niger

in a UITableView with different sections where the title will be the # ....... and the content 20110330 ........ 20110330 ........ 20110330 ........

someone can please help me?

  • 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-05T16:36:05+00:00Added an answer on June 5, 2026 at 4:36 pm

    use the for method is …

    for(NSString *firstArryStr in firstArry)
    {
    
                 //Put your all code here 
    }
    

    Hope this will resolve your problem

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

Sidebar

Related Questions

I have this code and I couldn't run it because i get this error:
I get this error, while I'm testing the code below: You have an error
this is my code and have a error: $('#map_canvas').mouseover(function(e){ console.log(e.offset().left+' '+e.offset().top) }) thanks i
i have this php code and keep on getting errors upon fixing each error.
I have code that generates this error: ** Message: pygobject_register_sinkfunc is deprecated (GstObject) Traceback
I have this in my code: SelectList(blah, blah, blah, cu.Customer.CustomerID.ToString()) It gives a error
I have 1 compiler error. It is from this line in my code: cout
I have this error message could not load assembly 'system.data.entity, version 4.2.0.0, culture=neutral,publickeytoken=b77a5c561934e089' or
I have this string: str is {( You, Me )} Looking on SO, I
I have this code NSString *tr = [self sendUrl:@http://google.com/]; But for some reason '

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.