iPad – How to update UITableView in DetailView when changing Tabbar in the pop-up controller?

I am creating an iPad app with splitview, this is a screenshot,

In this one, when I change the masterview controller ( On the left) tab, I want to update the value in the tableview on the right. This would be a good way, should I load another viewcontroller for each tab change? is it possible? Or just update the table? For all tab changes, I want to display a tableview with different data.
I use the code below and I can see the changes in the log, but the table is not updated.

- (void)setDetailItem:(id)newDetailItem
{
if (_detailItem != newDetailItem) {
[_detailItem release];
_detailItem = [newDetailItem retain];

// Update the view.
[self configureView];
}

if (self.masterPopoverController != nil) {
[self.masterPopoverController dismissPopoverAnimated:YES];
}
}

- (void)configureView
{
// Update the user interface for the detail item.
if (isStudent) {
textStr = @"student";
NSLog(@"Student....%@",textStr);
[self.tableView reloadData];
}if (isTeachers) {
textStr = @"teacher";
NSLog(@"Teacher....%@",textStr);

[self.tableView reloadData];
}if (isPreference) {
textStr = @"preference";
NSLog(@ "Preference....%@",textStr);

[self.tableView reloadData];
}if (isConfiguration) {
textStr = @"configuration";< br /> NSLog(@"Configuration....%@",textStr);

[self.tableView reloadData];
}
}

I tried it too

[self performSelectorOnMainThread:@selector(refreshTableView) withObject:nil waitUntilDone:NO];

Please share your thoughts.
Thanks:)

Finally I found this problem myself, I’m really happy to find Solution. I have browsed several forums and tutorials. Finally I came up with this problem. In this video, they have explained how to create a SplitView application with XCode 4.2. In this article, only one line of code is solved The problem. That is in the Appdelegate.m file. By default, MasterViewController does not have access to the detail view, so if we need to perform certain operations on the detailview, we must connect the masterviewcontroller and the detailviewcontroller. Check the video, and then you (those People facing the same problem) will understand.

Thank you:)

I am creating an iPad application with splitview, this Is the screenshot,

In this one, when I change the tab in the masterview controller (left), I want to update the value in the tableview on the right. It will be a very Good way, should I load another viewcontroller for each label change? is it possible? Or just update the table? For all tab changes, I want to display a tableview with different data.
I use the code below and I can see the changes in the log, but the table is not updated.

- (void)setDetailItem:(id)newDetailItem
{
if (_detailItem != newDetailItem) {
[_detailItem release];
_detailItem = [newDetailItem retain];

// Update the view.
[self configureView];
}

if (self.masterPopoverController != nil) {
[self.masterPopoverController dismissPopoverAnimated:YES];
}
}

- (void)configureView
{
// Update the user interface for the detail item.
if (isStudent) {
textStr = @"student";
NSLog(@"Student....%@",textStr);
[self.tableView reloadData];
}if (isTeachers) {
textStr = @"teacher";
NSLog(@"Teacher....%@",textStr);

[self.tableView reloadData];
}if (isPreference) {
textStr = @"preference";
NSLog(@"P reference....%@",textStr);

[self.tableView reloadData];
}if (isConfiguration) {
textStr = @"configuration";
NSLog(@"Configuration....%@",textStr);

[self.tableView reloadData];
}
}

I also tried it

[self performSelectorOnMainThread:@selector(refreshTableView) withObject:nil waitUntilDone:NO];

Please share your thoughts.< br>Thanks:)

Finally I found this problem myself, I am really happy to find a solution. I have browsed several forums and tutorials. Finally I figured out the problem. In this video, they have explained how to create a SplitView application with XCode 4.2. In this article, only one line of code solves this problem. That is in the Appdelegate.m file. Default In this case, the MasterViewController does not have access to the detail view, so if we need to perform some operations on the detailview, we must connect the masterviewcontroller and the detailviewcontroller. Check the video, and then you (those who face the same problem) will understand.

< /p>

Thank you:)

WordPress database error: [Table 'yf99682.wp_s6mz6tyggq_comments' doesn't exist]
SELECT SQL_CALC_FOUND_ROWS wp_s6mz6tyggq_comments.comment_ID FROM wp_s6mz6tyggq_comments WHERE ( comment_approved = '1' ) AND comment_post_ID = 973 ORDER BY wp_s6mz6tyggq_comments.comment_date_gmt ASC, wp_s6mz6tyggq_comments.comment_ID ASC

Leave a Comment

Your email address will not be published.