A split view controller has a viewControllers property, and the controller at index 1 will be the detail controller. So, you can accomplish the same task on the iPad version by putting in this code,
- (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath {
NSString *object = dailyGramsNumbers[indexPath.row];
NSString *object1 = dailyGramsBody[indexPath.row];
[self.splitViewController.viewControllers[1] setDetailItem:object1];
[self.splitViewController.viewControllers[1] setTitle:object];
}
You should import the DetailController.h file into the .m file of the master controller, and you might have to cast self.splitViewController.viewcontrollers[1] to your detail controller class.
After Edit:
If the detail controller is embedded in a navigation controller, code like this should work,
- (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath {
NSString *object = dailyGramsNumbers[indexPath.row];
NSString *object1 = dailyGramsBody[indexPath.row];
[(DetailViewController *)[self.splitViewController.viewControllers[1] topViewController] setDetailItem:object1];
[(DetailViewController *)[self.splitViewController.viewControllers[1] topViewController] setTitle:object];
}