How to use custom alignment?

Asked on 08/02/2024

1 search

To use custom alignment in your app, you can refer to the following sessions and segments from WWDC 2024:

  1. Customize spatial Persona templates in SharePlay:

    • You can align seats with an orthogonal axis of the app, such as the x or z axis. For example, to place a row of seats in a line all facing directly forwards perpendicular to your app's plane, you would align with the z axis. You can also rotate the seat by a given value in degrees or radians. Customize spatial Persona templates in SharePlay (31:36).
  2. What’s new in SF Symbols 6:

    • When working with SF Symbols, you can use the "snap to points" button to align vectors of the path and anchor points. This is useful for centering the anchor point precisely. What’s new in SF Symbols 6 (14:42).
  3. Dive deep into volumes and immersive spaces:

    • You can control how volumes present themselves within the world using world alignment. This can be either gravity-aligned or adaptive tilting behavior. The volume world alignment modifier allows overriding the adaptive alignment, keeping the volume aligned with the floor. Dive deep into volumes and immersive spaces (15:34).

These sessions provide detailed guidance on how to implement custom alignment in different contexts within your app.