# `GSFrameView zoomViewToRect:centering:inSafeArea:`

*Instance Method*

Zooms the view to fit the given target rect, optionally centering it.

## Declaration

```swift
func zoom(to target: NSRect, centering isCenteringRect: Bool, inSafeArea: Bool)
```

```objc
- (void) zoomViewToRect:(NSRect) target centering:(BOOL) isCenteringRect inSafeArea:(BOOL) inSafeArea;
```

```python
zoomViewToRect_centering_inSafeArea_(target: NSRect, isCenteringRect: bool, inSafeArea: bool)
```

## Parameters

- `target` — The target rect in view points.
- `isCenteringRect` — If `YES`, the target rect will be centered in the view. Otherwise, no scrolling is performed.
- `inSafeArea` — If `YES`, the target rect will be zoomed to fit the safe area of the view (the view bounds excluding the the Info box views).

