An IBOulet for an NSArray size in a Non-Controller Class

I have a class along the lines of:

@interface Foo : NSObject {
    NSMutableArray *bar;

Foo isn't a controller -- it's responsible for some other logic that I want encapsulated.

I'd like to have a label display the size of bar. If it was a value in a controller, I could simply make it an IBOutlet, connect it in IB, and everything would just work.

Can I do that with bar above?


If you're using that class to encapsulate certain functionality, don't use it to update the UI too. Rather have an instance of class Foo in your view controller and let your view controller update the label's value with the value of bar's size. You should make bar available via an accessor

Need Your Help

Is there a way to find out Object Manager's name with eScript?

oracle siebel server-administration escript

The basic need is to determine Object Manager's name for current running task. Additional benefit would be if we could also get Task Id, Component Name (in general), Component Group Name, Server Na...

Turning single-page app into Express app, problems with AJAX and .json file

json ajax node.js post express

I have a very simple single-page app (consisting of an index.html, style.css, functions.js and data.json) which I'm trying to turn into an Express/Node.js app to add some additional functionality. ...