I have a UITableViewController that I pragmatically call into my superview when needed. When I tap a table view I want the info to be placed in a UITextField. now I can get it to log correctly from the superview but the text never gets placed in its correct field.
Coming from the UITablViewController
:
- (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath*)indexPath
{
NSLog(@"Index %i Touched:",indexPath.row);
self.MainView = [[TwitterViewController alloc] init];
self.MainView.view = super.view;
selectedFriend = [(Tweet*)[friends objectAtIndex:indexPath.row]followingScreenName];
self.MainView.selectedFriendForTweet = self.selectedFriend;
[self.MainView setSelectedFriendInBody:self.selectedFriend
into:self.MainView.TweetBody
with:self];
//NSLog(@"selected name on tblview = %@",selectedFriend);
self.MainView.TweetBody.text = self.selectedFriend;
}
as you see my method is called when a user taps the tblview
[self.MainView setSelectedFriendInBody:self.selectedFriend into:self.MainView.TweetBody with:self];
Here is that method : Now this log Works and the info is correct but just will not go into the textview!
-(void)setSelectedFriendInBody:(NSString*)aString into:(UITextView*)atextView with:(id)sender
{
aString = friendsTbl.selectedFriend;
friendsTbl.selectedFriend = self.selectedFriendForTweet;
atextView = self.TweetBody;
[self.TweetBody setText:selectedFriendForTweet];
NSLog(@"superviews name = %@", selectedFriendForTweet);
[selectedFriendForTweet retain];
}
Any Help would be greatly appreciated! Thank you