Note that there are some explanatory texts on larger screens.

plurals
  1. POLabel text not initialising in new view iphone
    primarykey
    data
    text
    <p>DetailViewController.m</p> <p>Code:</p> <pre><code>- (void)viewDidLoad { [super viewDidLoad]; NSString *navTitle = self.navigationItem.title; NSString *stalklabel = self.labelforurl.text; NSLog(@"%@", stalklabel); NSURL *address = [NSURL URLWithString:[NSString stringWithFormat:@"http://www.twostepmedia.co.uk/json.php?q=%@",stalklabel]]; responseData = [[NSMutableData data] retain]; NSURLRequest *request = [NSURLRequest requestWithURL:address]; [[NSURLConnection alloc] initWithRequest:request delegate:self]; //NSString *address = [NSString stringWithFormat:@"http://www.twostepmedia.co.uk/json.php?q=%@",na]; //[self initiateRequest:address]; //NSURLRequest *request = [NSURLRequest requestWithURL:[NSURL URLWithString:address]]; //[[NSURLConnection alloc] initWithRequest:request delegate:self]; } </code></pre> <p>RootViewController.m</p> <p>Code:</p> <pre><code>- (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath { [tableView deselectRowAtIndexPath:indexPath animated:YES]; //Initialize the detail view controller and display it. DetailViewController *dvController = [[DetailViewController alloc] initWithNibName:@"DetailView" bundle:[NSBundle mainBundle]]; [self.navigationController pushViewController:dvController animated:YES]; NSManagedObject *managedObject = [self.fetchedResultsController objectAtIndexPath:indexPath]; dvController.navigationItem.title=[[managedObject valueForKey:@"data"] description]; dvController.labelforurl.text = [[managedObject valueForKey:@"data"] description]; [dvController release]; dvController = nil; } </code></pre> <p>The output of NSLOG is "Label"?? So when i try and embed it in the URL, it only comes back with "Label"??</p> <p>Any ideas?</p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload