-
Notifications
You must be signed in to change notification settings - Fork 49
Open
Description
I want to customize MDSpreadView display. So I subclasses MDSpreadViewCell and MDSpreadViewHeaderCell classes and loaded custom nib view for cells. (Same as we do to customize UITableViewCell).
Code I used is below
*MDSpreadViewCellCustom is subclass of MDSpreadViewCell
-
(MDSpreadViewCell *)spreadView:(MDSpreadView *)aSpreadView cellForRowAtIndexPath:(MDIndexPath *)rowPath forColumnAtIndexPath:(MDIndexPath *)columnPath
{
//if (rowPath.row >= 25) return nil; // use spreadView:objectValueForRowAtIndexPath:forColumnAtIndexPath below insteadstatic NSString *cellIdentifier = @"Cell";
MDSpreadViewCellCustom cell = (MDSpreadViewCellCustom)[aSpreadView dequeueReusableCellWithIdentifier:cellIdentifier];
if (cell == nil) {
cell = [[[MDSpreadViewCellCustom alloc] initWithStyle:MDSpreadViewCellStyleDefault reuseIdentifier:cellIdentifier] autorelease];
NSArray *nibViews = [[NSBundle mainBundle] loadNibNamed:@"MDSpreadViewCellCustom" owner:self options:nil];
cell = [nibViews objectAtIndex:0];
}
return cell;
}Please help me to figure out the issue and to customize the view.
Below is image of app after loading custom nib file
Metadata
Metadata
Assignees
Labels
No labels