---
title: "appendQuestion(pageID:rect:maxScore:)"
framework: Assignables
role: symbol
role_heading: Instance Method
platforms: [iOS 17.4+, iPadOS 17.4+, Mac Catalyst 17.4+]
path: "assignables/assignabledocument/appendquestion(pageid:rect:maxscore:)"
---

# appendQuestion(pageID:rect:maxScore:)

Creates a new question and appends it to the document.

## Declaration

```swift
@discardableResult mutating func appendQuestion(pageID: AssignableDocument.Page.ID, rect: CGRect, maxScore: Double? = nil) -> AssignableDocument.Question.ID
```

## Parameters

- `pageID`: The ID of the page to append the question to.
- `rect`: The region of the question on the page.

## Return Value

Return Value The newly created question’s ID.

## See Also

### Getting and setting the questions

- [questions(on:)](assignables/assignabledocument/questions(on:).md)
- [removeQuestion(_:)](assignables/assignabledocument/removequestion(_:).md)
