<!--
{
  "availability" : [
    "iOS: 18.1.0 -",
    "iPadOS: 18.1.0 -",
    "macCatalyst: 18.1.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "Assignables",
  "identifier" : "/documentation/Assignables/AssignableDocumentView/init(document:activePartID:hiddenPartIDs:selectedPageID:selectedQuestionID:showsPageThumbnails:isStructureEditingEnabled:allowsPencilDrawing:onMarkupActivation:)",
  "metadataVersion" : "0.1.0",
  "role" : "Initializer",
  "symbol" : {
    "kind" : "Initializer",
    "modules" : [
      "Assignables"
    ],
    "preciseIdentifier" : "s:11Assignables22AssignableDocumentViewV8document12activePartID06hiddenG3IDs012selectedPageH00k8QuestionH005showsL10Thumbnails25isStructureEditingEnabled19allowsPencilDrawing18onMarkupActivationAC7SwiftUI7BindingVyAA0bC0VG_AA023MergeablePartsContainergH0VSgSayATGAOyAQ0L0V0H0VSgGSgAOyAA05Basicc7ElementH0VyAQ0M0VGSgGSgS3bySbctcfc"
  },
  "title" : "init(document:activePartID:hiddenPartIDs:selectedPageID:selectedQuestionID:showsPageThumbnails:isStructureEditingEnabled:allowsPencilDrawing:onMarkupActivation:)"
}
-->

# init(document:activePartID:hiddenPartIDs:selectedPageID:selectedQuestionID:showsPageThumbnails:isStructureEditingEnabled:allowsPencilDrawing:onMarkupActivation:)

Displays an `AssignableDocument`.

```
@MainActor @preconcurrency init(document: Binding<AssignableDocumentView.Document>, activePartID: MergeablePartsContainerPartID? = nil, hiddenPartIDs: [MergeablePartsContainerPartID] = [], selectedPageID: Binding<AssignableDocumentView.Document.Page.ID?>? = nil, selectedQuestionID: Binding<AssignableDocumentView.Document.Question.ID?>? = nil, showsPageThumbnails: Bool = true, isStructureEditingEnabled: Bool = true, allowsPencilDrawing: Bool = true, onMarkupActivation: @escaping (Bool) -> Void)
```

## Parameters

`document`

A binding to the [`AssignableDocumentView.Document`](/documentation/Assignables/AssignableDocumentView/Document) to present in the view.

`activePartID`

The `PartID` to enable user interaction on.

`hiddenPartIDs`

A set of `PartID`s to hide on this view. Treated as a set.

`selectedPageID`

A binding to the selected page id.

`selectedQuestionID`

A binding to the selected question id.

`showsPageThumbnails`

Controls showing or hiding the document pages thumbnail previews.

`isStructureEditingEnabled`

Controls access to actions that allow changing the structure
of the document on the page thumbnail view contextual menu (i.e. add/duplicate/move/remove pages).

`onMarkupActivation`

An action performed when the user started or ended a drawing sequence with an Apple Pencil.

---

Copyright &copy; 2026 Apple Inc. All rights reserved. | [Terms of Use](https://www.apple.com/legal/internet-services/terms/site.html) | [Privacy Policy](https://www.apple.com/privacy/privacy-policy)