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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 6, 20262026-06-06T13:34:02+00:00 2026-06-06T13:34:02+00:00

I have created a custom subclass of UITableViewCell. There, I allow the user to

  • 0

I have created a custom subclass of UITableViewCell. There, I allow the user to edit some text in a UITextView. The cell belongs to a table in a popup view which is a subview of the root view. Now, I need to pass the text edited in the table cell, along with other data in the cell, to the root view. This is because, this edited data has to be sent to a webview which is also a subview of the root view.

I considered the following approaches. One is to make the popup view a delegate of the custom cell view and the root view a delgate of the popup view and pass the data through delegate method calls. This could make the design too complex. The second way is to store a reference to the webview in a singleton class when it is created and update it directly from the cell. But that would make the encapsulation all these classes are trying to achieve totally pointless.

What is the best approach to take? Is there any way other than the two I have suggested?

  • 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-06T13:34:04+00:00Added an answer on June 6, 2026 at 1:34 pm

    Use NSNotificationCenter, see the Class Reference

    Create the Notification

    [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(doSomething:) name:@"doSomething" object:nil];
    

    Post a Notification

    NSString * testString = @"Testing NSNotificationCenter";
    [[NSNotificationCenter defaultCenter] postNotificationName: @"doSomething" object: testString];
    

    Handle the Notification

    - (void)doSomething:(NSNotification *)notification
    {
        NSString * someString = [notification object];
        NSLog(@"String Passed from NSNotificationCenter: %@", someString);
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have created custom cell in which there are n number of image views.
I have created the following subclass to do some custom drawing: // DocumentIconView.h @interface
I have created a subclass of UITableViewController that is used as the custom class
I have a custom UITableViewCell created in IB. All my cells will have this
Here's the scenario - I have created a custom NSView subclass, and the implementation
I have created a custom UIButton (UIButton subclass) for my application. Within this button's
I have a UITableView and a UITableCell subclass. Each table cell has two scrollviews
I have created a custom subclass of UIView for an interface element that I
So I have: created a couple of custom controllers (add file UIViewController subclass) in
I have created a UIView subclass in order to implement a custom drawRect method.

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.