It's a single-column grid. With some effort, I suppose you could make a custom UITableViewCell to make it work like multiple columns.is the TableView in iPad also a GridView?
It's a single-column grid. With some effort, I suppose you could make a custom UITableViewCell to make it work like multiple columns.
I make a custom table cell, now I can get a Excel Format table.I'm looking for this as well.
Some of the approaches I've seen mentioned include:
1. AQGridView
2. DTGridView
3. Create your own UITableViewCell with multiple columns. Some references said it was relatively easy...
I've seen most references for AQGridView. Is that considered the best and simplest approach?
I make a custom table cell, now I can get a Excel Format table.
Make a customer TableCell and TableViewIs there sample code around to do that? Book or project or blog post?
#import <UIKit/UIKit.h>
@interface TradeCell : UITableViewCell {
UILabel *labelStartDate;
UILabel *labelEndDate;
UILabel *labelTradeType;
UILabel *labelCode;
UILabel *labelAmount;
UILabel *labelStartPrice;
UILabel *labelEndPrice;
UILabel *labelPosition;
UILabel *labelProfitLoss;
UILabel *labelProfitLossRate;
UILabel *labelFee;
UILabel *labelTax;
UILabel *labelInterest;
}
@property (nonatomic, retain) IBOutlet UILabel *labelStartDate;
@property (nonatomic, retain) IBOutlet UILabel *labelEndDate;
@property (nonatomic, retain) IBOutlet UILabel *labelTradeType;
@property (nonatomic, retain) IBOutlet UILabel *labelCode;
@property (nonatomic, retain) IBOutlet UILabel *labelAmount;
@property (nonatomic, retain) IBOutlet UILabel *labelStartPrice;
@property (nonatomic, retain) IBOutlet UILabel *labelEndPrice;
@property (nonatomic, retain) IBOutlet UILabel *labelPosition;
@property (nonatomic, retain) IBOutlet UILabel *labelProfitLoss;
@property (nonatomic, retain) IBOutlet UILabel *labelProfitLossRate;
@property (nonatomic, retain) IBOutlet UILabel *labelFee;
@property (nonatomic, retain) IBOutlet UILabel *labelTax;
@property (nonatomic, retain) IBOutlet UILabel *labelInterest;
@end
#import <UIKit/UIKit.h>
#define kTableViewRowHeight 44
#define kTradeFilename @"trade.plist"
#define kTradeKey @"Trades"
@interface TradeTableController : UIViewController <UITableViewDelegate, UITableViewDataSource> {
NSMutableArray *list;
UITableView *viewHeader;
UITableView *viewDetail;
}
@property (nonatomic, retain) NSMutableArray *list;
@property (nonatomic, retain) IBOutlet UITableView *rowHeader;
@property (nonatomic, retain) IBOutlet UITableView *rowDetail;
-(IBAction) toggleEdit:(id)sender;
-(NSString *) tradeFilePath;
-(void) applicationWillTerminate:(NSNotification *)notification;
@end
Make a customer TableCell and TableView
screen like this