iphone - Init method with parameters not called -


i spent hours trying solve issue i'm trying initialize class parameter

- (void)tableview:(uitableview *)tableview didselectrowatindexpath:(nsindexpath *)indexpath {     //fetch value of selected row in nsstring     uitableviewcell *cell = [tableview cellforrowatindexpath:indexpath];    // nsstring *tablerowvalue = cell.text;      tablerowvalue = [[listofitems objectatindex:indexpath.row]objectforkey: @"clientid"];       //call next view      contactslist *contactslist = [[contactslist alloc] initwithnibname:nsstringfromclass([contactslist class]) bundle:nil];     @try {          [self presentmodalviewcontroller:contactslist animated:yes];     }     @catch (nsexception *ex) {         uialertview *alert = [[uialertview alloc] initwithtitle:@"error" message:[nsstring stringwithformat:@"%@",ex]                                                        delegate:self cancelbuttontitle:@"ok" otherbuttontitles: nil];         [alert show];     }        contactslist.modaltransitionstyle = uimodaltransitionstylecrossdissolve ;      //initialize view clicked row value thwough nsstring variable     [contactslist init:tablerowvalue];  } 

this line of code

[contactslist init:tablerowvalue]; 

i getting following warning :expression result unused

and in contactslist class init method not being called

thank help

the contactlist object initialized in initwithnibname: method, in turn calls init method inherited nsobject (with no parameters).

if need setup view after initialization create method named "setupwithtablerowvalue:" or similar.


Comments

Popular posts from this blog

Why does Ruby on Rails generate add a blank line to the end of a file? -

keyboard - Smiles and long press feature in Android -

node.js - Bad Request - node js ajax post -