# `GSLayer doAlignComponents`

*Instance Method*

Performs component alignment immediately.

## Declaration

```swift
func doAlignComponents() -> Bool
```

```objc
- (BOOL) doAlignComponents;
```

```python
doAlignComponents() -> bool
```

## Return Value

`YES` when component alignment could be applied.

## See Also

### Component Alignment

- [`GSLayer alignComponents`](/Core/GlyphsCore/GSLayer/alignComponents) — Aligns components according to their alignment settings.
- [`GSLayer alignComponents:`](/Core/GlyphsCore/GSLayer/alignComponents:) — Aligns components according to their alignment settings.
- [`GSLayer needsAlignment`](/Core/GlyphsCore/GSLayer/needsAlignment) — Whether component alignment needs to be updated.
- [`GSLayer getPositionsFromLayer:`](/Core/GlyphsCore/GSLayer/getPositionsFromLayer:) — Copies shape positions and related hint positions from another layer.

