> On Oct 19, 2015, at 1:53 PM, Eric E. Dolecki <edole...@gmail.com> wrote:
> 
> I am asking if there is a way to call a method or set a property on an 
> ViewController object from another class. 

Sure, you just need a reference to it.

> let foo = ViewController()
> foo.object.hidden = true
> Something like that, but which works.

It sounds like the actual question is “how do I get a reference to my 
ViewController?” The answer depends on the context. What’s the method that 
needs to do this? Show us the entire method (and what class it’s in.)

Is it Cocoa programming in general that’s giving you problems, or is this 
something you know how to do in Objective-C but just aren’t sure in Swift?

—Jens
_______________________________________________

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

Reply via email to