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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 2, 20262026-06-02T18:17:34+00:00 2026-06-02T18:17:34+00:00

i have a search bar and search some information from internet, then start a

  • 0

i have a search bar and search some information from internet, then start a NSXMLParser from url and then show information parsed in a UITableView, but in this process the UI is blocked, and if i want to cancel the searching to do another search i can’t and i have to wait that the parser finish, so my question is how i can perform on another thread if it is the right solution and then abort the searching for doing another search if necessary?…i know the NSOperation class but how this class can then give the information to the table view to display the data?…and how i can abort the operation to do another operation?

now i do this to do the search:

 [self performSelector:@selector(request:) withObject:searchText afterDelay:0.7];

then the request method, start in another class the search with the NSXMLParser…

  • 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-02T18:17:35+00:00Added an answer on June 2, 2026 at 6:17 pm

    To avoid blocking the UI, you would use

    [self performSelectorInBackground:@selector(request:) withObject:text];

    I haven’t worked much with NSOperation, but from the docs, it looks like you can set a completion block for the operation, in which you could call something like

    [self performSelectorOnMainThread:@selector(populateMyTable) withObject:nil waitUntilDone:NO];

    Also, NSOperation has an instance method cancel that seems to offer what you’re looking for as far as aborting your search method.

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

Sidebar

Related Questions

I have some progress bar (search results), which value is dynamically set on document.ready
I have a tableview with a search bar. All is working fine but now
I am trying to implement UISearch bar but I have some problems. When app
I want to add a search bar in my activity. I have some lat
I have a search bar. Entering text in it and clicking search takes you
alt text http://img216.imageshack.us/img216/2288/problem11.png As given in the picture, I have an search bar in
I have created a search bar for my website, the user may search a
I have a UI table view with a search bar and it works well
I have a Controller with a search bar at top, and when the user
I Have site change.is, where right side menu & search bar in header is

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.