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

  • Home
  • SEARCH
  • 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 8453079
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 10, 20262026-06-10T11:40:32+00:00 2026-06-10T11:40:32+00:00

I have a doubts in writing a for loop in Objective C way. I

  • 0

I have a doubts in writing a for loop in Objective C way. I can do the same loop in traditional C for loop, However I am trying to learn Objective C. Here is my question.
listdata is a mutable array holding objects of ofi_vc_modal_ab_user_info objects, I want to compare each email of list data with email until list data count and find its position and if found I want to delete the object from list data.

    for (ofi_vc_modal_ab_user_info *loc_obj in listData)
    {
        if (strcasecmp(loc_obj->email, email) == 0) {
           // What need to do here.
        }
    }

How to proceed here… thanks for your helps 🙂

  • 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-10T11:40:34+00:00Added an answer on June 10, 2026 at 11:40 am
    BOOL foundObject = NO; 
    ofi_vc_modal_ab_user_info *loc_found_obj = nil; 
    for (ofi_vc_modal_ab_user_info *loc_obj in listData)
    {
        if (strcasecmp(loc_obj->email, email) == 0) {
           // Set your flag here
           loc_found_obj = loc_obj;
            foundObject = YES;
            break;
        }
    }
    if(foundObject) {
    // Do your stuffs as object is found
    // Your found object is in loc_found_obj
     [listData removeObject:loc_found_obj];
    }
    

    I hope below code explains what you want. Please explain bit more if you need more help.

    EDIT : If you are using NSMutableArray then you do not need index of the object. you can directly delete object as mentioned in my edited code.

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

Sidebar

Related Questions

I have some doubts. What is querystrng? how we can use it? what are
i'm writing my first plugin for wordpress and i have some doubts regarding the
I have a few doubts regarding exception handling in iPhone. Here are they: Suppose
I can surely answer to this question by myself writing a dummy test but
I have a doubt about orkut's new URL Writing method. Earlier the home page
I am thinking about using Gears in a project, but I have doubts about
I have two doubts: 1. I would like to add some client side support
I have some doubts about construction and initialization order guarantees in C++. For instance,
I have programmed an emulator, but I have some doubts about how to organizate
I'm a beginner about javascript, and I have some doubts about the variables of

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.