objective c - NEED HELP to send an string to another viewcontroller -
my nsstring dynamically generated in tableview should send viewcontroller: (message)
-(void)tableview:(uitableview *)tableview didselectrowatindexpath:(nsindexpath *)indexpath { [self.tableview deselectrowatindexpath:indexpath animated:yes]; loanmodel* loan = _feed.users[indexpath.row]; nsstring* message = [nsstring stringwithformat:@"%@ from", loan.name ]; }
the detailviewcontroller should message
// detailviewcontroller.h #import <uikit/uikit.h> @interface detailviewcontroller : uiviewcontroller @property (strong, nonatomic) id detailitem; @property (weak, nonatomic) iboutlet uilabel *message; @end
what procedure connect message label named name ? (with assistant editor) thanks
you can either create delegate protocol , call method in detail page set message or instantiate detail view passing message.
Comments
Post a Comment