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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T16:02:46+00:00 2026-05-23T16:02:46+00:00

Im very new to Objective-C and am currently learning how to use Xcode and

  • 0

Im very new to Objective-C and am currently learning how to use Xcode and create iOS applications. I am currently testing a Navigation based application. As part of my display I need to download web data, strip the html tags, format the string etc, which takes quite alot of code. I found when this code is inserted into the implementation file its quite slow in the iPhone simulator.
This may seem like a really obvious question but am I right putting the code in the View implementation file? or should I create a separate file to do all the data handling then pass the results to the view file?
Once again, sorry if this is trivial and any help is appreciated.

  • 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-23T16:02:46+00:00Added an answer on May 23, 2026 at 4:02 pm

    Hi and welcome to Stack Overflow! Technically, what you are doing now is fine. However, a common strategy for effective coding is called Model-View-Controller, where you separate components that do different things. For your example, the downloading and processing should take place in the model section, which is where content comes from. The controller is simply responsible for taking the model’s data and passing it to the view. The view is already provided as part of UINavigationViewController. Again, this doesn’t affect performance, it’s just a style that makes later maintenance easier.

    EDIT

    In response to your second question, here’s what you can do (assuming you have MyModel and MyController).

    MyModel.h:

    @interface MyModel : NSObject {
        NSMutableArray *_data;
    }
    @property (nonatomic, retain) NSMutableArray *data;
    @end
    

    MyModel.m:

    @implementation MyModel
    
    @synthesize data = _data;
    
    - (id)init {
        if ((self = [super init])) {
            self.data = [[[NSArray alloc] init] autorelease];
            // do your processing here and add it to self.data
        }
        return self;
    }
    

    Then, in MyController.m, initialize an instance of MyModel and access model.data whenever you want that array.

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

Sidebar

Related Questions

First of all, I am a a very new Objective C/Cocoa iOS Developer but
I'm new to Objective C and XCode, currently working on my first iPhone Game.
I am very new to xcode & Objective-C (having come from PHP) i have
I am fairly new to Objective C and iOS programming but am constantly trying
Hey there, I'm a designer thats really new to programming with xcode or Objective-C
I am fairly new to Objective-C. Currently porting my own library from C#/Java to
I'm new to objective-c and at the moment developing a small application. I have
Hey I am very new to Web Programming. I have been learning PHP from
i'm receiving the following errors, very new to iphone dev and objective C. I
I'm still very new to ShiVa3d and fairly new to iOS. I'd like to

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.