iphone - How to set label.text with NSString as soon as new view loaded, NSString value is set in class method -
I want to set the label on my new view (which I am loading on selection of table row) to variable NSString In value, what I'm doing here is
- (zero) tableview: (UITableView *) tableview was done by SelectionRowAtIndexPath: (NSIndexPath *) indexPath {int select_row = [indexPath line]; Singleton * index_instance = [singleton shared instant index]; [Index_instance setIndex: selected_row]; Selected_OR = [index_indexindex: selected_orrow]; NSLog (@ "Selected Row% d", selected_o); [SealcityView controller upload: content: selected_orrow]; [Self-Present Model View Controller: Selection / Animator Controller: Yes]; }
.h file
NSString * rest_name; IBOutlet UILabel * lbl; // Some class methods are declared
in .m file
- (zero) viewDidload {{Super Viewedload]; Lbl.text = rest_name; } // class method + (zero) uploadthopent: (int) data {celesteion viewcroller controller = [[sealcityviewcroller alloc] init]; [Controller label: data]; // call labelet method which sets rest_name for some value [controller release]; } - (zero) Labatt: (int) data {[rest_name release]; Singleton * Indexes Instance = [Singleton Shared Orient Indexes]; Singleton * rnameinstace = [singleton shared instrument 1]; // Singletown * BadnessStance = [Singleton Shared Instance 2]; NSMutableArray * selected_rname; // eNSMutableArray * selected_baddr; INTI = [Index Institutions Gate Index: Data]; Select_rname = [rnameinstace getR name: selected_rname]; NSString * rname = [[NSArray arraywise Array: selected_arm] ObjectOutInx: i]; NSLog (@ "Restaurant Name:% @", rname); //lbl.text = rest_name; Rest_name = [[NSString alloc] init]; Rest_name = rname; NSLog (@ "I am here:% @", rest_name); // [Maintaining rest_name]; } // rest_name is the one I am trying to access and set as the label
Looks like your outlet can not connect?
Comments
Post a Comment