Removing all CALayer’s sublayers March 11, 2023 by Tarik The simplest way to remove all sublayers from a layer is to set the sublayer property to nil: rootLayer.sublayers = nil;