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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 2, 20262026-06-02T14:56:47+00:00 2026-06-02T14:56:47+00:00

Hi everyone I have a really strange problem. I create a new subclass of

  • 0

Hi everyone I have a really strange problem. I create a new subclass of NSObject, but I just cannot use “self.someproperty” in the implementation. Normally when I type the word “self”, Xcode will guess what I’m typing and give me the property name after dot. But in this case, it doesn’t and give me an red error. I have check my code for a night and give up now. So, wish some one give me a advise please let me know this might be a small problem somewhere?

Here’s my code:

#import <Foundation/Foundation.h>

@interface FlickrPhotoCache : NSObject

+(BOOL)isInCache:(NSDictionary *)photo;

@end



#import "FlickrPhotoCache.h"

@interface FlickrPhotoCache()

@property (nonatomic, strong) NSMutableArray *photos;

@end

@implementation FlickrPhotoCache
@synthesize photos = _photos;

+(BOOL)isInCache:(NSDictionary *)photo
{
    self.photos // here I get error
}

@end

Thanks in advance! WHT

  • 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-02T14:56:54+00:00Added an answer on June 2, 2026 at 2:56 pm

    You’re using + when declaring the method which is for static (class) methods not instance methods self only exists in the instance methods.

    Use

     -(BOOL)isInCache:(NSDictionary *)photo;
    

    When declaring to use the instance variable self for properties.

    And then

    -(BOOL)isInCache:(NSDictionary *)photo
    {
        self.photos;
    }
    

    Works just fine.

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

Sidebar

Related Questions

Thank everyone for the help I have made some really good changes but now
Everyone, I have really tried, but I can't find out how to upload photos
Hi everyone my problem today is I have a couple of buttons that slide
Good day everyone. I have been having the same problem all day at work
Good day everyone! I have a problem regarding my date. It needs to be
I really would like to use 2010 if only since they appear to have
Okay, I have a strange problem. I wanted to run one of my programs
Update : I edited the code, but the problem persists... Hi everyone, this is
I have often heard this term being used, but I have never really understood
I am really new to php, I have recently developed a reliability simple web

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.