Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8990021
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 15, 20262026-06-15T22:24:18+00:00 2026-06-15T22:24:18+00:00

my problem – I want to pass information from the TableView in DetailView, but

  • 0

my problem – I want to pass information from the TableView in DetailView, but somewhere in the self.detailViewController.detailItem no value is passed.

that is:

self.detailViewController.detailItem =@"123";

NSString *sss = self.detailViewController.detailItem;

NSLog(@"%@",  sss);

In NSLog output (null)

Here is my source code:

DetailViewController.h

#import <UIKit/UIKit.h>

@interface DetailViewController : UIViewController <UISplitViewControllerDelegate>

@property id detailItem;
@property id TitleOfDetail;

@property (weak, nonatomic) IBOutlet UILabel *detailDescriptionLabel;

@end

DetailViewController.m

#import "DetailViewController.h"

@interface DetailViewController ()
@property (strong, nonatomic) UIPopoverController *masterPopoverController;
- (void)configureView;
@end

@implementation DetailViewController




#pragma mark - Managing the detail item


-(void)setTitleOfDetail:(id)newTitleOfDetail {

    NSLog(@"123");

    if (_TitleOfDetail != newTitleOfDetail) {
        _TitleOfDetail = newTitleOfDetail;
        // Update the view.
        [self configureView];
    }
}


-(void)setDetailItem:(id)newDetailItem
{
    NSLog(@"123");

    if (_detailItem != newDetailItem) {
        _detailItem = newDetailItem;

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

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

- (void)configureView
{
    // Update the user interface for the detail item.

    NSLog(@"1%@", self.TitleOfDetail);
    NSLog(@"2%@", [self.detailItem description]);

    if (self.TitleOfDetail) {
        self.title = self.TitleOfDetail;
    }


    if (self.detailItem) {
        self.detailDescriptionLabel.text = [self.detailItem description];
    }
}

- (void)viewDidLoad
{
    [super viewDidLoad];
    // Do any additional setup after loading the view, typically from a nib.
    [self configureView];
}
…

myclass.h

@class DetailViewController;

@interface myclass : UITableViewController 

@property DetailViewController *detailViewController;

@end

myclass.m

#import "choiseAvtoController.h"
#import "DetailViewController.h"

@interface myclass ()
@end

@implementation myclass

@synthesize detailViewController;

…

- (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath
{
    self.detailViewController.detailItem =@"123";

NSString *sss = self.detailViewController.detailItem;

NSLog(@"%@",  sss);
}

In what may be the problem and how to fix it?

P.S. Sorry for my english, I’m just learning))

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-15T22:24:20+00:00Added an answer on June 15, 2026 at 10:24 pm

    Since you are using a storyboard, you should be opening the detail controller on a segue.

    Look up the segue identifier (say, it’s OpenDetail) in the story board, then add the following code to your initial controller:

    -(void)prepareForSegue:(UIStoryboardPopoverSegue*)segue sender:(id)sender {
        if ([segue.identifier isEqualToString:@"OpenDetail"]) {
            DetailViewController *dest = segue.destinationViewController;
            dest.detailItem =@"123";
        }
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Problem is I can see already the value of my json through firebug but
Problem: I have a table that prints out vertical but I would like it
Problem: I'm streaming my video from a php file with stream_get_contents(); using Flowplayer as
Problem I have a Silverlight 5 application using the treeview from the SDK. Now
Problem : Need onclick event to pause/unpause a Youtube video, but impossible to add
Problem: Visitors open the url website.com/?i=133r534|213213|12312312 but this url isn't valid anymore and they
Problem: I need to write a function which returns a value for a input
Problem : i'm trying to add a 2nd Jpanel in my frame but when
Problem: I don't want to expose $myProperty , that is it shouldn't be public
Problem: To obtain the id from a radio button using jQuery on click or

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.