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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T08:03:30+00:00 2026-05-23T08:03:30+00:00

Specific question based on my implementation is: Question: have a UIViewController which has a

  • 0

Specific question based on my implementation is:

Question:

  • have a UIViewController which has a some views within it (configured in an XIB file)
  • when something occurs in one of the controls on the screen here (i.e. in one of the views), how can I update a UIViewController parameter at the same time?

Background:

  • In my case I have a colorPickerController, and within this there are some subview which the user interacts with the select the color
  • when the user is dragging the mouse over one of the subviews, one of the other others is updated with the color
  • what I’m not sure of is how to also keep the main colorPickerController parameter updated with the latest color that is being selected
  • hence the question how to update/access a controller’s parameter from within one of the views within a controller
  • 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-23T08:03:31+00:00Added an answer on May 23, 2026 at 8:03 am

    The subview the user drags mouse (or finger?) over can be considered as some kind of a control, so you would just use target/action in that case. or may be a delegation. that way you would keep this subview and viewcontroller loosely coupled, and that would also allow you to reuse that same class (which the subview is instance of) in other places. so, in case of delegation:

    1. define a protocol:

      @protocol ColorPickerViewDelegate

      • (void)colorPickerView:(ColorPickerView *)cpView didUpdateWithColor:(UIColor *)newColor;
        @end
    2. add property @property(nonatomic, assign) id<ColorPickerViewDelegate> didUpdateDelegate; to color picking UIView subclass.

    3. Make your viewcontroller adopt the above protocol and define the method from that protocol in viewcontroller’s implementation section.

    4. When creating a color picking subview, set your viewcontroller as that subview’s didUpdateDelegate.

    5. make calls to didUpdateDelegate at appropriate times in your color picking view touch-handling logic: [didUpdateDelegate colorPickerView:self didUpdateWithColor:someNewColor];

    hope that’s what you want

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

Sidebar

Related Questions

I have a class called Question that has a property called Type. Based on
I don't have a specific question here but I'm more looking for some guidance
I know this specific question has been asked before , but I am not
[ Of course, the question is not restricted to a specific friend implementation, feel
In my PHP application, I have a mysql table of articles which has the
This is a very specific question regarding MySQL as implemented in WordPress . I'm
Note This is not a REBOL-specific question. You can answer it in any language.
All, I'm working on a SharePoint project, but this isn't a SharePoint-specific question per-se.
I don't know if this is too specific a question, if that is possible,
My question is best phrase as: Remove a child with a specific attribute, in

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.