• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Best practice for actions invocation across multi-tiered subviews
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Best practice for actions invocation across multi-tiered subviews


  • Subject: Best practice for actions invocation across multi-tiered subviews
  • From: Richard Adams <email@hidden>
  • Date: Wed, 27 Aug 2008 18:32:19 +0100

I feel this is a relatively newbie question, however the archive searching at http://search.lists.apple.com/ seems unavailable.

I am wondering what the best implementation practice is for the following scenario

I have a the following object view hierarchy (simplified for discussion)

Root View Controller
|-Action to Manipulate Main and Alternate View Controllers
|-View Controller (Alternate)
|-View Controller (Main)
     |-Main View
          |-Custom Button A
                |- Method to update attributes of Custom Button A
          |-Custom Button B
                |- Method to update attributes of Custom Button B
          |-Custom Button C
                |- Method to update attributes of Custom Button C

Now View Controller (Main) has no knowledge of any of the Custom Buttons as that is the job of Main View. The Action in Root View is there to manage transitions, animations etc between the Main and Alternate views. The Method of the Custom Buttons is specific to the button objects and gets invoked on a button event such as an event up.

The challenge I am having is that the method of the buttons needs to do it's local object updates and then invoke a view transition by calling the action in the Root View. What is the best practice for "coding" the custom button method to invoke the root view action. Nothing I seem to think of is clean in maintaining the abstractions between the Root Controller and the Main Views implementation of the buttons.

Apologies if the question is too open ended - since it's a best practices question I'm trying to avoid "leading the witness".

Thanks in advance,

Richard

_______________________________________________

Cocoa-dev mailing list (email@hidden)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden


  • Prev by Date: Re: CoreData, SQLite and GUID
  • Next by Date: Re: Core Data - use of simple accessors vs. KVC
  • Previous by thread: Re: Core Data - use of simple accessors vs. KVC
  • Next by thread: Problem with Info.plist in 10.5
  • Index(es):
    • Date
    • Thread