• 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
Within UITableViewCell: capturing UISegmentedControl event & Row number?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Within UITableViewCell: capturing UISegmentedControl event & Row number?


  • Subject: Within UITableViewCell: capturing UISegmentedControl event & Row number?
  • From: Frederick C.Lee <email@hidden>
  • Date: Sun, 18 Oct 2009 19:37:14 -0500

The Environment:
   (1) iPhone SDK 3.2.1

The Setup:
   (1) UITableViewCell is defined within its own XIB...
        Interface Builder (XIB):
        File's Owner: <Table> View Controller.

(2) UISegmentController's Action Method is defined within the <Table> View Controller; along side
with: UITableViewDataSource & UITableViewDelegate methods.


(3) Elements of the UITableViewCell XIB are linked with the File's Owner: <Table> View Controller.

-------------------
The Scenario:
I have a UITableView of Cells, each containing one UILabel and one UISegmentedControl.
I need to capture BOTH the UISegmentedControl segment index (via ACTION method)
AND the respective table-row number.


-------------------
My Problem:
a) I can capture the UISegmentControl's index via its respective Action Method
within the <Table> View Controller; but I can not...
b) capture the ROW number.


However, I can capture ROW identifier IF I click (press) on the background UIView; but I'm
hindered by the UISegmentedControl.


-------------------
Question:
   What is the best way to do BOTH?

(a) Forwarding the event up the responder chain from within the action method doesn't appear to work.
Perhaps it's too late.


(b) Making a subclass of the UITableViewCell and handling the event manually could work, but I'll
loose the benefit of the UISegmentedControl's action method to determine the index.


Any ideas?

Ric.
_______________________________________________

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


  • Follow-Ups:
    • Re: Within UITableViewCell: capturing UISegmentedControl event & Row number?
      • From: Alexander Spohr <email@hidden>
  • Prev by Date: unsleep the display programatically?
  • Next by Date: Re: unsleep the display programatically?
  • Previous by thread: Re: unsleep the display programatically?
  • Next by thread: Re: Within UITableViewCell: capturing UISegmentedControl event & Row number?
  • Index(es):
    • Date
    • Thread