0

HI I am programming an app which I want the height of a cell to change if the switch is on, I had it working before then I needed to copy my files over to a new project.This works then I make a small change to return 0 instead This does not work

Dark Innocence
  • 1,389
  • 9
  • 17
CFRJ
  • 157
  • 1
  • 12

1 Answers1

1

Make sure you are using the latest code from the master. I think this looks likes a similar issue I found on their GitHub. Have a look:-

http://github.com/patchthecode/JTAppleCalendar/issues/304

Dark Innocence
  • 1,389
  • 9
  • 17
  • Hi I have no protocol function that I've used, I only checked if the switch was on and is the indexPath was right then changed the height, maybe there are better ways to do it, but this worked before so I stuck with it. I tried using your code but I got error at (cell: customCell) and isButtonOn lines. Any ideas? btw I'm new to swift and programming in general – CFRJ Jul 02 '17 at 15:02
  • of course you will get an error, as this code only explains the concept and is not a full implementation of the thing. I meant to ask you whether each cell has a button like this or the button is outside the tableview ( not belonging to the tableviewcell ) ? – Dark Innocence Jul 02 '17 at 16:08
  • the table looks like this http://imgur.com/a/67Ejq so the button is in another cell. – CFRJ Jul 02 '17 at 16:56
  • that calendar will shrink if the button is off ? Is the calendar made in tableviewcell itself? – Dark Innocence Jul 02 '17 at 17:07
  • Yes it will shrink to the size it was from the beginning. At the moment it will crash if the start size is less than 80 or something like that – CFRJ Jul 02 '17 at 17:12
  • oh okay, and that's why you return 0 it crashes because it needs minimum 80 – Dark Innocence Jul 02 '17 at 17:16
  • is this any third party lib you are using ? – Dark Innocence Jul 02 '17 at 17:17
  • make sure you are using the latest code from the master. I think this looks likes a similar issue I found on their GitHub. Have a look:- https://github.com/patchthecode/JTAppleCalendar/issues/304 – Dark Innocence Jul 02 '17 at 17:29
  • Thank you very much it works now! I had to update to the latest version. Should I accept your first answer as correct? – CFRJ Jul 02 '17 at 17:42