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 have a string (customerName) in CustomersViewController (view 1). now i just want to display in my CustomersViewDetailController (view 2) the string (customerName) from CustomersViewController (view 1). this should be displayed in the section 0 of my tableview.
it must be something little but i don´t know how to do!?
You only need to do this once. If you are doing it twice just so you can indicate both to use your .xib and that you want the UIViewController to be of type UITableViewStyleGrouped, I would go with indicating the .xib file and set the style in interface builder. Also you should not set cusDetailViewController to nil in the method but in the dealloc method (unless you are using xcode 4, which does this for you).
Lastly, to set the cell.textLabel in cusDetailViewController, you need to pass "name" to this new viewController in some way (possibly NSUserDefaults) and then set it as the textLabel.text of the cell in either cellForRowAtIndexPath or willDisplayCell.
Replies
Once here:
and again here:
You only need to do this once. If you are doing it twice just so you can indicate both to use your .xib and that you want the UIViewController to be of type UITableViewStyleGrouped, I would go with indicating the .xib file and set the style in interface builder. Also you should not set cusDetailViewController to nil in the method but in the dealloc method (unless you are using xcode 4, which does this for you).
Lastly, to set the cell.textLabel in cusDetailViewController, you need to pass "name" to this new viewController in some way (possibly NSUserDefaults) and then set it as the textLabel.text of the cell in either cellForRowAtIndexPath or willDisplayCell.
- Spam
- Abuse
- Troll
0 · Off Topic Insightful Disagree Dislike Like Awesome