Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

sldice

macrumors newbie
Original poster
Oct 24, 2010
20
0
I was hoping someone could help me with what I think is an easy question. I am new so not everything makese sense yet.

So to learn I am making a simple higher or lower card game. When a card ties instead of being higher or lower I want it to go to a new view. I have made that work, but I can't get anything to work in the new view.

Because I don't understand everything yet, I have the same variables & objects in both ViewControllers. So lets say I have card1 object, randomNumber variable in my HighLowViewController.h, and I have the same in my TieViewController.h file.

I guess my question would be are you allowed to use the same names twice if they are in separate ViewControllers? I don't get any errors, but when I go to the TieViewController it is supposed to radomize the first card (which it does fine in my first ViewController), but it does nothing which makes me feel like I can switch views but somehow I haven't connected something to read the methods in the TieVewController. I hope that makes sense.
 
Looks like a similar problem I had with an instance method not getting called.

Did you allocate and init the variable instance in your Tie controller?
My guess is that it is nil and not responding to messages.

see my post called "subclass method not being called".
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.