Hey guys, so this is pretty much the last thing that I need to solve before being done with my app, and it's pretty easy that I am sure this is a very simple problem that I am just overlooking the answer for no reason. Here it is.
Most of my app is written in one class (I know it's bad practice but that's just what happened.)
There is a UITableView in that class, that is filled with custom cells from another class.
The problem that I have is that I have a button inside of the custom cells, and I need that button to work with the other class. Now had I been working with java or C I would probably either use inheritance or make the method static, but I don't know how to do this in Obj C.
Here is the goal: I need to either implement the bottom method
in the other class, or I just need to be able to access a text field from the first class, inside of the custom cells button method. (i.e. When I click the button in the cell, I need something to print inside of a text field that is in the first class. There are also some other variables that I need to access, but I can do those once I get this problem solved)
I don't see the need for me to write down my code, since this is a very general question and isn't exactly code specific, but if you need it then I could show some of it.
Thank you for all the help in advance!!
- Steven French
Most of my app is written in one class (I know it's bad practice but that's just what happened.)
There is a UITableView in that class, that is filled with custom cells from another class.
The problem that I have is that I have a button inside of the custom cells, and I need that button to work with the other class. Now had I been working with java or C I would probably either use inheritance or make the method static, but I don't know how to do this in Obj C.
Here is the goal: I need to either implement the bottom method
Code:
-(IBAction)button:(id)sender;
I don't see the need for me to write down my code, since this is a very general question and isn't exactly code specific, but if you need it then I could show some of it.
Thank you for all the help in advance!!
- Steven French
Last edited by a moderator: