---
title: renewGState()
framework: appkit
role: symbol
role_heading: Instance Method
path: appkit/nsview/renewgstate()
---

# renewGState()

Invalidates the view’s graphics state object, if it has one.

## Declaration

```swift
func renewGState()
```

## Discussion

Discussion The view’s graphics state object will be regenerated using setUpGState() the next time the view is focused for drawing

## See Also

### Methods

- [lockFocus()](appkit/nsview/lockfocus().md)
- [lockFocusIfCanDraw()](appkit/nsview/lockfocusifcandraw().md)
- [lockFocusIfCanDraw(in:)](appkit/nsview/lockfocusifcandraw(in:).md)
- [unlockFocus()](appkit/nsview/unlockfocus().md)
- [scroll(_:by:)](appkit/nsview/scroll(_:by:).md)
- [shouldDrawColor()](appkit/nsview/shoulddrawcolor().md)
- [allocateGState()](appkit/nsview/allocategstate().md)
- [gState()](appkit/nsview/gstate().md)
- [setUpGState()](appkit/nsview/setupgstate().md)
- [releaseGState()](appkit/nsview/releasegstate().md)
- [dragFile(_:from:slideBack:event:)](appkit/nsview/dragfile(_:from:slideback:event:).md)
- [dragPromisedFiles(ofTypes:from:source:slideBack:event:)](appkit/nsview/dragpromisedfiles(oftypes:from:source:slideback:event:).md)
