Re: How does a UIButton perform a segue?
Re: How does a UIButton perform a segue?
- Subject: Re: How does a UIButton perform a segue?
- From: Quincey Morris <email@hidden>
- Date: Wed, 25 Jun 2014 16:18:16 -0700
On Jun 25, 2014, at 16:06 , Rick Mann <email@hidden> wrote:
> Well, I suppose, but that sort of forces the -prepare method to know a lot about the view hierarchy. I'd rather not do that.
Your original question was about finding the cell for the button. Therefore, it’s already implicit in your approach that the view controller doing ‘prepareForSegue:’ knows that the button is in a table view, hence in a cell, hence a subview of the cell. There’s no special-case knowledge involved there.
The view controller doesn’t need to know in advance how many steps up there are from the button to the cell, if that’s what’s worrying you. You can use one of those loopy things to find the cell. ;)
_______________________________________________
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