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

Re: Within UITableViewCell: capturing UISegmentedControl event & Row number?


  • Subject: Re: Within UITableViewCell: capturing UISegmentedControl event & Row number?
  • From: "Frederick C. Lee" <email@hidden>
  • Date: Wed, 21 Oct 2009 21:13:28 -0500

I figured it out.Yes.  That's how it's done.
Thanks for reply!

Ric.

On Mon, Oct 19, 2009 at 1:17 AM, Alexander Spohr <email@hidden> wrote:

> Frederick,
> just an idea - from UIView’s documentation:
>
> tag
> The receiver’s tag, an integer that you can use to identify view objects in
> your application.
> @property(nonatomic) NSInteger tag
>
> Set the tag of each segmented view to the row before you hand it out to the
> table view.
>
>        atze
>
>
>
> Am 19.10.2009 um 02:37 schrieb Frederick C.Lee:
>
>  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
>>
>
>
_______________________________________________

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

References: 
 >Within UITableViewCell: capturing UISegmentedControl event & Row number? (From: Frederick C.Lee <email@hidden>)
 >Re: Within UITableViewCell: capturing UISegmentedControl event & Row number? (From: Alexander Spohr <email@hidden>)

  • Prev by Date: Re: How to run a panel that customizes a new NSDocument
  • Next by Date: Re: How to run a panel that customizes a new NSDocument
  • Previous by thread: Re: Within UITableViewCell: capturing UISegmentedControl event & Row number?
  • Next by thread: OSX have that is equivalent to WaitMessage() Win32 API
  • Index(es):
    • Date
    • Thread