UA-17470720-3

Jump to content


Photo
- - - - -

Custom cell heigh


  • Please log in to reply
7 replies to this topic

#1 ozie

ozie

    ¯\_(ツ)_/¯

  • STV 5.0 Pro
  • PipPipPipPipPipPipPip
  • 526 posts
  • LocationAustralia
Reputation: 169
Popular

Posted 13 January 2016 - 06:04 PM

trying to set the height of a custom cell, but its just staying at 44

 

So i have a custom SCCustomCell configured and contains a UICollectionView.. the cell loads because I can set the collectionView background colour and can see it in the tableview

 

SCPropertyDefinition *imageDef = [courseDef propertyDefinitionWithName:@"~iconimage"];
    imageDef.uiElementNibName = @"myImagePicker";
    imageDef.type = SCPropertyTypeCustom;
    imageDef.cellActions.willConfigure = ^(SCTableViewCell *cell, NSIndexPath *indexPath)
    {
        cell.height = 100.0f;
    };
    imageDef.cellActions.willDisplay = ^(SCTableViewCell *cell, NSIndexPath *indexPath)
    {
        cell.height = 100.0f;
};

 

imageDef.cellActions.willConfigure is NEVER called... willDisplay does.. but the height is always 44

 

even tried 

detailVC.tableViewModel.cellActions.willConfigure = ^(SCTableViewCell *cell, NSIndexPath *indexPath)

 

which only fires off for the non custom property name 'title' and never for the custom ~ property


Edited by ozie, 13 January 2016 - 06:21 PM.

P.S. I hate Swift.. don't talk Swift.. Too old school to learn yet another programming language.


#2 Dave Guerin

Dave Guerin

    Forum Master

  • STV 5.0 Pro
  • PipPipPipPipPipPipPip
  • 539 posts
  • LocationIreland
Reputation: 134
Popular

Posted 14 January 2016 - 02:45 AM

Hi Ozie,

 

STV 5.2.1 has issues wth ~customProperties when a uiElementNibName is set for the cell:

 

http://sensiblecocoa.com/community/topic/2356-stv-510-beta-and-customproperties/#entry13158 

 

 

willConfigure is never called.

 

I expect that's what you are seeing here.

 

 

And if you can set the height in willConfigure everything should then work.


  • Tarek likes this
Cheers,

Dave

www.dgapps.ie

#3 ozie

ozie

    ¯\_(ツ)_/¯

  • STV 5.0 Pro
  • PipPipPipPipPipPipPip
  • 526 posts
  • LocationAustralia
Reputation: 169
Popular

Posted 14 January 2016 - 02:46 AM

ahh.. i thought that was fixed

 

that would be my problem


P.S. I hate Swift.. don't talk Swift.. Too old school to learn yet another programming language.


#4 Tarek

Tarek

    Forum Admin

  • Administrators
  • 3670 posts
Reputation: 452
Popular

Posted 14 January 2016 - 08:37 AM

Thank you Dave, this should be fixed in our upcoming release.

 

Having said that, are you also setting any heights in the Xib file itself? If you are and it's not respecting it, then that's another bug that we should look into.


  • Dave Guerin likes this

#5 ozie

ozie

    ¯\_(ツ)_/¯

  • STV 5.0 Pro
  • PipPipPipPipPipPipPip
  • 526 posts
  • LocationAustralia
Reputation: 169
Popular

Posted 14 January 2016 - 01:38 PM

yup the height is also set the same in the xib file too


P.S. I hate Swift.. don't talk Swift.. Too old school to learn yet another programming language.


#6 Tarek

Tarek

    Forum Admin

  • Administrators
  • 3670 posts
Reputation: 452
Popular

Posted 14 January 2016 - 02:33 PM

I just tested that and it seems to work. I suggest you either:

 

a. Uncheck the cell's 'Auto Resize' checkbox.

 

b. Review your Auto Layout constraints so that they run from the top of the cell to the bottom.



#7 ozie

ozie

    ¯\_(ツ)_/¯

  • STV 5.0 Pro
  • PipPipPipPipPipPipPip
  • 526 posts
  • LocationAustralia
Reputation: 169
Popular

Posted 14 January 2016 - 03:04 PM

here is a demo app that no matter what I try it does not resize to what I want it to.. it just stays at 44

 

Attached File  custom cell bug.zip   39.68K   8 downloads


P.S. I hate Swift.. don't talk Swift.. Too old school to learn yet another programming language.


#8 Tarek

Tarek

    Forum Admin

  • Administrators
  • 3670 posts
Reputation: 452
Popular

Posted 14 January 2016 - 03:07 PM

Thank you ozie, will check it out.






0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users