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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 12, 20262026-06-12T09:08:24+00:00 2026-06-12T09:08:24+00:00

I have a couple of classes that I set up properties in. e.g. a

  • 0

I have a couple of classes that I set up properties in.

e.g. a class called MyDetailCell that subclassed UITableViewCell.

In it I had a property something like…

@property SomeClass *someValue;

Initially I was using it and storing it within the setter function…

- (void)setSomeValue:(SomeClass*)someValue
{
    _somValue = someValue;

    //do something with the _someValue object like changing text or something...
}

Anyway, I decided that I didn’t actually need to store the value that was sent in so I was just doing this…

- (void)setSomeValue:(SomeClass*)someValue
{
    //do something with the _someValue object like changing text or something...
}

And then I changed to where I was just passing the setter forward to a subview. Like this…

- (void)setSomeValue:(SomeClass*)someValue
{
    self.someSubView.someValue = someValue;
}

So now I’m not sure what to use. I’m not actually saving the property at all now so I guess I don’t really need it. I don’t need to access it to get the value either I just need to set it.

At the moment I’ve left the property in there as it is.

  • Is that OK?
  • Is that bad practise?
  • Should I change it for just a setter method instead?
  • What are the benefits of doing that?
  • 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-12T09:08:25+00:00Added an answer on June 12, 2026 at 9:08 am

    Is that OK?

    No.

    Is it bad practice?

    Yes.

    Should I change it for a just a setter method instead? What are the benefits of doing that?

    I don’t see what you mean by this. You wrote ‘just a setter method’ and you also did some processing in the setter method, which is fine, but you did other things wrong. One is that you don’t retain a non-delegate object – you should. You don’t provide a getter – that’s also a broken concept. There can be readonly and readwrite properties, but not write only properties.

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

Sidebar

Related Questions

I have a set of classes something like this: abstract class CollectionAbs implements Iterator
I have a class called EditMapUtilities. Here are some class properties that I want
If I have a couple of classes like this ; public class Employee {
ok I have couple of .NET classes that I want to use in VBA.
I have a couple of classes (for this example anyway) that use code first
I have an interface called IAddress, and a class called Address that handles street,
I have a couple of classes BitMask & BitMaskLarge that both implement an interface
I have a couple of classes that want to pass each other some information
I have a need to create a couple of classes that will serve as
I have an existing codebase that persists a couple of simple classes to disk

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.