. Advertisement .
..3..
. Advertisement .
..4..
My class uses the NSLayoutManagerDelegate interface. But overriding the technique I require seems to be impossible. I act as described in the documentation:
override func layoutManager(_ aLayoutManager: NSLayoutManager!,
didCompleteLayoutForTextContainer aTextContainer: NSTextContainer!,
atEnd flag: Bool) {
}
However, it appears the error: method does not override method from its superclass. Please help me fix this issue. Thanks a lot.
The cause:
Although you are implementing a protocol method, it is not an override. That is the cause of the error occurrence “method does not override method from its superclass”.
Solution:
Follow this way to solve your problem.
Simply get rid of the
override
keyword. When your superclass implements a method as well, you are supplying an override that you want to change how the superclass implementation behaves.