I want to add a simple loading-screen to my app while it is loading several content from a webserver to inform the user.
To get round corners and a nice border i’m using a CALayer Object.
But when i want to add content to this layer, is doesn’t work.
I can only add Images and other CALayer objects, but i want to add a UILabel or a UIView.
Is this possible? I checked some tutorials and apple documents but i cant find a solution.
Is there a simple solution to fix that problem?
I want to add a simple loading-screen to my app while it is loading
Share
Every view in UIKit is backed by a layer so you can have the power of both worlds. Use a UIView with UILabel for the text and set the corner radius of the views backing layer via the layer property