needsDisplay()定义返回值needsDisplay()返回一个布尔值,指示该Layer是否已标记为需要更新。 定义func needsDisplay() -> Bool 返回值如果需要更新Layer,则为true。