display data from sqlite to label using FMDB
问题 How to display data from SQLite to label using FMDB like this: I would like to display whatever the output is in this format for the user to see. No Interaction. Only display for the select query. 回答1: If you want to add UILabel objects, just iterate through your result set, adding labels to your view. Something like: NSInteger rowNum = 0; NSArray *columnWidths = @[@(50), @(120), @(75), @(75)]; CGFloat rowHeight = 24.0; FMResultSet *rs = [db executeQuery:sql]; while ([rs next]) { CGFloat x =