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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 30, 20262026-05-30T07:45:42+00:00 2026-05-30T07:45:42+00:00

I have two classes, Class A and Class B. Class A has a method

  • 0

I have two classes, Class A and Class B.

Class A has a method

 -(void)methodA:(id)sender
{

}

and Class B has a method

-(void)methodB:(id)sender
{

}

Now i have some work is happening in methodA ,So once it is completed i want to send a notification from methodA: to methodB: So i can do some operation on the basis of notification.

So how can i do this? Can anybody guide me as i am new to obj-c?

  • 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-30T07:45:44+00:00Added an answer on May 30, 2026 at 7:45 am

    Use delegate. Simple code from wiki: visit http://en.wikipedia.org/wiki/Delegation_pattern

    • A delegate is an object whose objects are (generally) called to handle or respond to specific events or actions.
    • You must “tell” an object which accepts a delegate that you want to be the delegate. This is done by calling [object setDelegate:self]; or setting object.delegate = self; in your code.
    • The object acting as the delegate should implement the specified delegate methods. The object often defines methods either in a protocol, or on NSObject via a category as default/empty methods, or both. (The formal protocol approach is probably cleaner, especially now that Objective-C 2.0 supports optional protocol methods.)
    • When a relevant event occurs, the calling object checks to see if the delegate implements the matching method (using -respondsToSelector:) and calls that method if it does. The delegate then has control to do whatever it must to respond before returning control to the caller.
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have two classes: Action class, that has a method for executing VBScript files,
I have a class which has two HashSet<String> collections as private members. Other classes
I have two classes : import android.cla; public class CW { public static void
I have two classes class A { public string something { get; set; }
I have a two classes: public class Question { public IList<Answer> Answers { get;
I have these two classes public class Person { } public class Company {
Let's say we have these two classes: public class Base { public static int
greetngs, i have two classes: [Serializable] public class FireGridUnit { public GridUnit FireGridLocation {
I have two classes declared like this: class Object1 { protected ulong guid; protected
I have two classes Address and Employee as follows: public class Address { public

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.