Use Cosmos in Storyboard
masterTo use Cosmos via Interface Builder:
- Drag a
Viewobject from the Object Library into your storyboard. - In the Identity Inspector, set the view's class to
CosmosView. Set its module property toCosmos(unless you added the source file manually). - Customize the appearance (stars, colors, etc.) using the Attributes Inspector.
Note: If stars do not appear in the storyboard, go to the Editor menu and select Refresh All Views.
Positioning: Use Auto Layout constraints. The view's width and height are determined automatically based on its content (stars and text), so you do not need to set explicit width/height constraints.