On Apr 5, 2017, at 14:06 , Doug Hill <cocoa...@breaqz.com> 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 (Cocoa-dev@lists.apple.com) 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 arch...@mail-archive.com