Please do not post the same thing multiple times. The board software automatically flags certain posts as needing moderator attention. This happens the most often for new users. I'm pretty sure this is made clear at the time you attempt to post. Posting the same thing over and over again just makes that many more posts the moderators have to weed through later. This makes us sad. Don't make us sad. If your post/thread doesn't appear, just wait a while. Don't post it again. If it hasn't shown up by the next day, then you can try again. I normally go through posts in the mornings, and try to check a few times throughout the day, but I'm not here 24/7. There will typically be a significant delay before posts are approved. Just be patient.
I followed a tutorial on how to make a table view. when I run the app it doesn't continue to the detailViewController (dvController) when i click at a cell. but if i first activate the searchfield and then deactivate it, it does continue to the DetailViewController when i click at cell.
This is how the didSelectRowAtIndexPath method looks like:
If you place a breakpoint at the beginning of the method and run, does it get entered?
I'm in slight disagreement with the previous poster though (sorry, previous poster). Setting to Nil after release is good practice as it prevents you from accidentally referring to memory that may no longer be valid. Prior to ARC I used to just use a macro "#define RELEASE(X) [X release]; X=Nil;" and then just call RELEASE(myVar).
Yes, it just gets highlighted. precisely where should i put the NSLog? If I put it after the if statement I get errors like "expected expression before 'else'" and "'dvController' undeclared". And if i put it after the else statement nothing happens, just the same problem as i had before.
Perhaps its a bit difficult for u to say when you cant see the whole code but heres the whole RootViewController.h
Replies
try adding a logging statement:
NSLog(@"%@", selectedCountry);
right after your if/then statement to see what that value is.
also, i don't think you want the dvController = nil; line in after you release a variable.
- Spam
- Abuse
- Troll
0 • Off Topic Insightful Disagree Dislike Like AwesomeI'm in slight disagreement with the previous poster though (sorry, previous poster).
Setting to Nil after release is good practice as it prevents you from accidentally referring to memory that may no longer be valid. Prior to ARC I used to just use a macro "#define RELEASE(X) [X release]; X=Nil;" and then just call RELEASE(myVar).
- Spam
- Abuse
- Troll
0 • Off Topic Insightful Disagree Dislike Like Awesomeprecisely where should i put the NSLog? If I put it after the if statement I get errors like "expected expression before 'else'" and "'dvController' undeclared". And if i put it after the else statement nothing happens, just the same problem as i had before.
Perhaps its a bit difficult for u to say when you cant see the whole code but heres the whole RootViewController.h
Thank You!
- Spam
- Abuse
- Troll
0 • Off Topic Insightful Disagree Dislike Like Awesome