I have created one ipad app where 1st screen is split view. In that master view is table view and detail view holds image view controller. My problem is that when initially application gets loaded the 1st cell of table view should seen as selected and corresponding image view should appear at detail view.
Asked
Active
Viewed 199 times
1 Answers
0
It seems like you don't need only the cell to be seen as selected, but you need that cell to be selected (to make corresponding image appear)
You should see this post How do I select a UITableViewCell by default?
Here is sample code
-(void)viewDidLoad:(BOOL)animated {
[uiTableView selectRowAtIndexPath:[NSIndexPath indexPathForRow:0 inSection:0] animated:NO scrollPosition:0];
}
or if you actually want to make the cell look like selected, you can do something like
-(void)viewDidLoad:(BOOL)animated {
UITableViewCell *cell= [uiTableView cellForRowAtIndexPath:[NSIndexPath indexPathForRow:0 inSection:0]];
[cell setHighlighted:TRUE animated:TRUE];
}