Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

didSelect method not working after subclassing MDSpreadViewCell and MDSpreadViewHeaderCell #24

Open
afsalme opened this issue Oct 2, 2013 · 1 comment

Comments

@afsalme
Copy link

afsalme commented Oct 2, 2013

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 instead

    static 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
    screen shot 2013-10-02 at 10 38 15 am

@afsalme afsalme closed this as completed Oct 2, 2013
@afsalme afsalme reopened this Oct 2, 2013
@dimitribouniol
Copy link
Member

Is this still an issue?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants