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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 25, 20262026-05-25T00:57:49+00:00 2026-05-25T00:57:49+00:00

I need your help. I have write my own custom NSOperation class called GetNewsOperation.

  • 0

I need your help. I have write my own custom NSOperation class called GetNewsOperation. I call it like this:

GetNewsOperation *getNewsOperation = [[GetNewsOperation alloc] initWithLocalNewsCategories:self];
[loadNewsOperationQueue addOperation:getNewsOperation];
[getNewsOperation release];

In GetNewsOperation class I have implemented init method for initialization and main method for executing operation and returning data back to the main thread.

Main method looks like this:

- (void)main {
    NSAutoreleasePool* pool = [[NSAutoreleasePool alloc] init];

    AppSettingsController *sharedAppSettingsController = [AppSettingsController sharedAppSettingsController];

    if( [type isEqualToString:@"getCategory"] ) {
        NSMutableArray *parsedData = [[NSMutableArray alloc] initWithArray:[sharedAppSettingsController getLocalNewsCategories]];

        [newsViewController performSelectorOnMainThread:@selector(loadDataResponse:) withObject:[NSArray arrayWithObjects:parsedData, nil] waitUntilDone:NO];

        [parsedData release]; parsedData = nil;
    }

    [pool release];
}

Everything works fine but I have a minor problem. When this operation is called application does not rotate on device orientation change. It changes after operation is finished.

As far as I know this operation is running for sure in new thread (not in main) cos all other elements in the app are active (not freezed). But I have only problem with orientation. The app looks kind a crappy if application does not rotate only when this operation occurs…

How can I solve this?

Thanks!

  • 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-25T00:57:49+00:00Added an answer on May 25, 2026 at 12:57 am

    Actually it works like predicted. I was doing something else on main thread that blocked application.

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

Sidebar

Related Questions

I need your help. I have this javascript function to write a message to
I have a CKEditor custom plugin I'm trying to write, but need some help
i need again your help... I have this php code: <? if(isset($_POST['addnews'])){ $type =
I am new to Rails and I need your help. I have this: #
I need your help, For example I have a decimal type variable and I
I've some questions .. and I really need your help. I have an application.
I really need your help for this. I am relatively new to programming and
ive being trying to cope with this problem but still. I need your help.
I need your expertise once again. I have a java class that searches a
Hi Java programmers. I badly need your help. I have a JavaFX/Java ME application.

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.