views:

46

answers:

1

I'm using a UIViewController with some buttons, labels, etc which I need to change attributes of depending on the situation.

I'm looking to create an NSObject to control these elements based on an int in the View Controller. When a button is pressed the NSObject will deallocate, the int will change and the NSObject will re-instantiate using the new number creating a new view.

Does this make sense? If so do I set up the IBOutlets for the buttons/labels in the NSObject or in the UIViewController? How does the NSObject reference the buttons? How do I instantiate/deallocate the NSObject inside of the UIViewController to enact these changes?

Thank You!!

A: 

Why bother to create an object to control the resetting of the view? Just make sure that you build the thing in the first place programmatically inside the init function, then have a property that the parent class can read.

I'm not sure why you need the object in there in the first place. Maybe explain what you're trying to do exactly in the long run?

XenElement
This was a way of going about things suggested by a fellow programmer. The project involves making a storybook style app with many pages each page having sound bites and animations. My thought was that the object could look at a separate file and determine what sounds and animations each page should play without setting up a separate view class for each page.
emachine