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

How to subclass the cells? #37

Closed
mamcx opened this issue Sep 13, 2011 · 4 comments
Closed

How to subclass the cells? #37

mamcx opened this issue Sep 13, 2011 · 4 comments

Comments

@mamcx
Copy link

mamcx commented Sep 13, 2011

In the wiki say that this could work as the springboard.

I can draw the cells, but adding new subviews on the cells block the selection code, and the delegates are not fired for selection.

Also, I try loading from a nib with the same results (the cells are show, but not selection work).

@kolinkrewinkel
Copy link
Owner

Try using userInteractionEnabled: NO on subviews. Also: I'm not planning to add XIB support cause it's slow, if it requires work.

Sent from my iPhone

On Sep 13, 2011, at 2:06 PM, mamcxreply@reply.github.com wrote:

In the wiki say that this could work as the springboard.

I can draw the cells, but adding new subviews on the cells block the selection code, and the delegates are not fired for selection.

Also, I try loading from a nib with the same results (the cells are show, but not selection work).

Reply to this email directly or view it on GitHub:
#37

@mamcx
Copy link
Author

mamcx commented Sep 16, 2011

I try that a not work...

Mario A.Montoya
Gerente
http://www.elmalabarista.com

Haz pedidos & facturas con tu iPhone: http://www.bestsellerapp.com

@mamcx
Copy link
Author

mamcx commented Sep 16, 2011

Also, I add the views purely by code:

  • (KKGridViewCell *)gridView:(KKGridView *)_gridView
    cellForItemAtIndexPath:(KKIndexPath *)indexPath

{

NSString *cellID = [HomeCellView cellIdentifier];

HomeCellView *cell = (HomeCellView *)[gridView

dequeueReusableCellWithIdentifier:cellID];

if (cell == nil) {

    /*[[NSBundle mainBundle] loadNibNamed:@"HomeCell" owner:self

options:nil];

    cell = self.homeCell;

    self.homeCell = nil;*/

    cell = [[HomeCellView alloc] initWithFrame:CGRectMake(0,0,

HOME_WIDTH, HOME_HEIGTH)];

    cell.title = [[UILabel alloc] initWithFrame:CGRectMake(0,0,

HOME_WIDTH, 36)];

    cell.backgroundColor = [UIColor grayColor];

    cell.title.backgroundColor = [UIColor blackColor];

    cell.title.opaque = YES;

    [cell addSubview:cell.title];

}



return cell;

}

And don't work neither...

@kolinkrewinkel
Copy link
Owner

Did you ever figure this out?

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