Int property in class definition
- by Daniel I-S
I have the following class structure for custom UITableViewCells:
NumericEntryCell
- Contains method for controlling max value that can be entered into a textbox.
SliderCell
- inherits from NEC and contains methods for handling slider-control of textbox value
TextOnlyCell
- just contains a textbox
CellA
- inherits from SliderCell and has a max value of 28
CellB
- inherits from TextOnlyCell and has a max value of 150.
I want NumericEntryCell to contain a definition for a property that contains the maxValue. I want to be able to set a value for this in the initialize method of a child class (CellA or CellB).
Currently I have an int maxValue declared in the interface of NEC. I declare a property for this with @property int maxValue and @synthesize it within the .m file. However, attempting to modify this property's value from CellA or CellB's initialize method has no effect - when I hit a breakpoint in the NEC method that uses this value, its value is always zero. How can I get this to work?