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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 18, 20262026-05-18T02:33:24+00:00 2026-05-18T02:33:24+00:00

I know it is a common problem, I googled a lot and seems get

  • 0

I know it is a common problem, I googled a lot and seems get no luck to solve my problem.
I have a @interface TestViewController:UIViewController
and in its implementation file I have a method defined:

-(void)method1 {
  do something; 
  [self method1];//here I need to call the method itself if a statement is true and this line is where the warning TestViewController may not respond to'method1' I got
}

-(void)method2{
  [self method1] //But there is no problem with this line
}

Can anyone help me?
Thanks in advance!

  • 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-18T02:33:25+00:00Added an answer on May 18, 2026 at 2:33 am

    Your method declarations are missing in the header.
    Just add

    -(void)method1;
    -(void)method2;
    

    to your TestViewController.h file

    Update:

    The reason why you don’t get a warning about the second call ([self method1] within method2) is, that the compiler already knows about method1 at that point. (because the implementation occurs before method2)

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

Sidebar

Related Questions

It seems pretty common to want to let your javascript know a particular dom
I know this is a common convention, but what does the k in variable
Does anyone know where I can find a library of common but difficult (out
What are all the common undefined behaviours that a C++ programmer should know about?
Does any Common Lisp (builtin) function return more than 2 values? I know many
Does anyone know of papers/books/etc. that document patterns for databases? For example, one common
Know of an OCAML/CAML IDE? Especially one that runs on Linux?
Know of any good libraries for this? I did some searches and didn't come
I know in certain circumstances, such as long running processes, it is important to
I know Microsoft has made efforts in the direction of semantic and cross-browser compliant

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.