Alright, thanks for the follow-up. It looks there's nothing built into UIKit 
for doing this lookup or a way to store a reference in IB, so I'll try one of 
these solutions.

Doug Hill
https://github.com/djfitz/SFFontFeatures 
<https://github.com/djfitz/SFFontFeatures>


> On Apr 5, 2017, at 2:30 PM, Quincey Morris 
> <[email protected]> wrote:
> 
> On Apr 5, 2017, at 14:06 , Doug Hill <[email protected] 
> <mailto:[email protected]>> wrote:
>> 
>> Let's say, views are in position 1, 2, and 3 and I want to configure 1, 2,  
>> and 3 differently based on their position.
> 
> The simplest way would be to set a different tag on each view, and 
> distinguish between them using “viewController.view.tag”. The slightly less 
> simple but slightly more elegant way would be to define a property on the 
> view controller itself, and use the “User Defined Run Time Attributes” editor 
> on the Identity inspector to set a different value for each view controller.
> 
> Or you could sort the childViewControllers array on 
> viewController.view.origin.y, and identify the view controllers from their 
> sorted index.
> 
>> I'm thinking of making a outlet to the embedding view and then compare this 
>> view with view controllers in childViewControllers. But seems like a lot of 
>> busy work It would be great to be able to more easily lookup the view 
>> controller for a particular embed view. Any chance?
> 
> I think one of the above techniques would be easier.
> 

_______________________________________________

Cocoa-dev mailing list ([email protected])

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:
https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to [email protected]

Reply via email to