ios - Perform addition of values from each cell of tableview -
i working on shopping app add items in cart. have show sub total amount need perform addition of price of each item in table. how can pick values each cell , add them? below code tableview: #pragma mark - table view data source - (nsinteger)tableview:(uitableview *)tableview numberofrowsinsection:(nsinteger)section { return [cartlist count]; } - (uitableviewcell *)tableview:(uitableview *)tableview cellforrowatindexpath:(nsindexpath *)indexpath { nsdictionary *celldata = [[[cartlist objectatindex:indexpath.row] valueforkey:@"addtocartproductimagemodel"] firstobject]; nsstring *image=[celldata valueforkey:@"productimg"]; nsstring *urlstring = [nsstring stringwithformat:@"http://dealnxt.com/areas/user/productimage/%@", image]; nsurl *url = [nsurl urlwithstring:urlstring]; nsdata *data = [nsdata datawithcontentsofurl:url]; nsstring *celldata = [[cartlist objectatindex:indexpath.row] valueforkey:@"shortdescription