0

Here is the link to the video: https://imgur.com/BgHFRJT

I have a date picker that is inserted when I click on a cell, and the "information" section header title is moved off the screen. When I click it again to delete the date picker from my tableView, the "information" section title doesn't move up properly and is already at the top.

For inserting a date picker cell, I found these lines of code and decided to not use this because it essentially created a custom cell that contained a datepicker which was not ideal for memory since a lot of my cells trigger a date picker.

The program basically gets the index path for the new picker cell to be created and then in cellForRow I am checking if the indexpath should be a date picker or not.

One thing I noticed is that when the whole section header (ex. information) is in view throughout the transition, the issue doesn't occur. It only happens when the title is off then view and has to move back into the view.

  • 1
    Are you reloading a particular section or the entire tableView? I think you are using expandable/collapsable tableView header. – Let's_Create Jan 20 '19 at 18:36
  • my tableView header is the default header. I'm not reloading anything, only begin and end updates afaik. I tried reloading sections though with no luck –  Jan 20 '19 at 18:42
  • Could you try reloading the tableView I think it would solve your issue but it would not show the animation. – Let's_Create Jan 20 '19 at 18:44

1 Answers1

1

I'm using self sizing cells, so I couldn't really keep estimatedRowHeight = 0.0. When creating my tableView object I ran into this answer and it works properly now. All I had to do was set all of them to 0 except for my row height.