---
title: viewMode
framework: foundation
role: symbol
role_heading: Type Property
path: foundation/nsattributedstring/documentattributekey/viewmode
---

# viewMode

The view mode.

## Declaration

```swift
static let viewMode: NSAttributedString.DocumentAttributeKey
```

## Discussion

Discussion The value of this attribute is an NSValue object containing an integer. A value of 0 indicates normal, and a value of 1 indicates page layout (use the value @"PaperSize"). The string constant in macOS 10.3 and earlier is @"ViewMode".

## See Also

### Getting document appearance keys

- [appearance](foundation/nsattributedstring/documentattributekey/appearance.md)
- [backgroundColor](foundation/nsattributedstring/documentattributekey/backgroundcolor.md)
- [bottomMargin](foundation/nsattributedstring/documentattributekey/bottommargin.md)
- [defaultFontExcluded](foundation/nsattributedstring/documentattributekey/defaultfontexcluded.md)
- [defaultTabInterval](foundation/nsattributedstring/documentattributekey/defaulttabinterval.md)
- [excludedElements](foundation/nsattributedstring/documentattributekey/excludedelements.md)
- [hyphenationFactor](foundation/nsattributedstring/documentattributekey/hyphenationfactor.md)
- [leftMargin](foundation/nsattributedstring/documentattributekey/leftmargin.md)
- [paperMargin](foundation/nsattributedstring/documentattributekey/papermargin.md)
- [paperSize](foundation/nsattributedstring/documentattributekey/papersize.md)
- [prefixSpaces](foundation/nsattributedstring/documentattributekey/prefixspaces.md)
- [rightMargin](foundation/nsattributedstring/documentattributekey/rightmargin.md)
- [textLayoutSections](foundation/nsattributedstring/documentattributekey/textlayoutsections.md)
- [topMargin](foundation/nsattributedstring/documentattributekey/topmargin.md)
- [viewSize](foundation/nsattributedstring/documentattributekey/viewsize.md)
