1

I have an AsyncDisplayNode from Facebook's AsyncDisplayKit framework. When there is a data change in my app, the content of that cell may need to be changed, and I want to signal that change by calling the invalidateCalculatedSize method, which should trigger a re-measurement for the next time the node is displayed.

However, Xcode displays the following error:

ASDisplayNode does not have a member named 'invalidateCalculatedSize'

The same is true for all other types of nodes I tried, such as ASCellNodes and ASTextCellNodes, even though I see in the source code of ASTextCellNode a call to invalidateCalculatedSize.

On top of that, thinking that perhaps it's an Xcode Swift autocompletion issue, when I try to compile, the build fails with the same error as shown above. So, how do I invalidate the node size?

arik
  • 28,170
  • 36
  • 100
  • 156
  • Oh, I think I found the answer here: https://github.com/facebook/AsyncDisplayKit/issues/408 – arik May 03 '15 at 22:41

1 Answers1

1

You should import a header file for sub-classing a node.

#import <AsyncDisplayKit/ASDisplayNode+Subclasses.h>
Tiep Vu Van
  • 975
  • 8
  • 13