ios - NSString StringWithFormat returns nil? -


i created table view links user has saved. user can click on cell link , go direct webpage (view controller web view). however, link returns null in prepareforsegue method , web view appears empty. stringwithformat may need rewritten. block of code assigned when user clicks on link in table view.

tableview.m

-(void)prepareforsegue:(uistoryboardsegue *)segue sender:(id)sender {     if ([[segue identifier] isequaltostring:@"showarticle"]) {         nsindexpath *indexpath = [self.tableview indexpathforselectedrow];          nsstring *urlstring = [nsstring stringwithformat:@"http://%@", _todoitems[indexpath.row]];         [[segue destinationviewcontroller] seturl:urlstring];  

are sure array of items has items? should put breakpoint , print out value of todoitem @ indexpath. if not null create string format coding.


Comments

Popular posts from this blog

sublimetext3 - what keyboard shortcut is to comment/uncomment for this script tag in sublime -

java - No use of nillable="0" in SOAP Webservice -

ubuntu - Laravel 5.2 quickstart guide gives Not Found Error -