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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 16, 20262026-06-16T07:59:11+00:00 2026-06-16T07:59:11+00:00

I am trying to call a method from another class which is in another

  • 0

I am trying to call a method from another class which is in another source file.

Example:

  1. I have a file named Source1.h/Source1.m (both are objective C class files)
  2. I have another file names Source2.h/Source2.m (both are objective C class files)
  3. Source1 contains 2 methods eg: method1 and method2.
  4. From Source2 file, I need to call the method1 from source1 file.

I know how to do that in objective C. But in my source2 file, the method names in Source1 will be retrieved dynamically. I am not going to hard code it some thing similar to this.

Source1 *a = [[Source1 alloc]init];

[a method1];

The method1 text will taken from a text file. I can use Selector to invoke a method from same class. But I can’t use selector to call method from another class.

Please help to solve this issue….

Many 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-06-16T07:59:12+00:00Added an answer on June 16, 2026 at 7:59 am

    This answer seems to be relevant: How can I dynamically create a selector at runtime with Objective-C?

    Basically you can use NSSelectorFromString to make a selector from an UTF8 string in an NSString.

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

Sidebar

Related Questions

I am trying to call method getDetails() from another class which in turns calls
I'm trying to call a method from another class with a simple button in
I'm trying to call a method from another class and from what I've gathered,
I am trying to make a call to a Parent class method from a
I'm trying to call a method, which is in a dll I've imported, from
I have a class (let's call it Class1), which inherits another class (Class2). What
I'm trying to use a method from within another method in a class. I
I'm trying to call method from .jar But when I want to declare array
I am trying to call my Javascript method from my java in GWT below
Im trying to call a method that will add or subtract 1 from a

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.