<!--
{
  "availability" : [
    "iOS: 15.0.0 -",
    "iPadOS: 15.0.0 -",
    "macCatalyst: 15.0.0 -",
    "macOS: 12.0.0 -",
    "tvOS: 15.0.0 -",
    "visionOS: 1.0.0 -",
    "watchOS: 8.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "SwiftUI",
  "identifier" : "/documentation/SwiftUI/TimelineView/init(_:content:)-1mlmj",
  "metadataVersion" : "0.1.0",
  "role" : "Initializer",
  "symbol" : {
    "kind" : "Initializer",
    "modules" : [
      "SwiftUI"
    ],
    "preciseIdentifier" : "s:7SwiftUI12TimelineViewVA2A0D0R_rlE_7contentACyxq_Gx_q_AC7ContextVyAA011EveryMinuteC8ScheduleVs5NeverO_Gctcfc"
  },
  "title" : "init(_:content:)"
}
-->

# init(_:content:)

Creates a new timeline view that uses the given schedule.

```
@export(implementation) nonisolated init(_ schedule: Schedule, @ContentBuilder content: @escaping (TimelineViewDefaultContext) -> Content)
```

## Parameters

`schedule`

A schedule that produces a sequence of dates that
indicate the instances when the view should update.
Use a type that conforms to [`TimelineSchedule`](/documentation/SwiftUI/TimelineSchedule), like
[`everyMinute`](/documentation/SwiftUI/TimelineSchedule/everyMinute), or a custom timeline schedule
that you define.

`content`

A closure that generates view content at the moments
indicated by the schedule. The closure takes an input of type
[`TimelineViewDefaultContext`](/documentation/SwiftUI/TimelineViewDefaultContext) that includes the date from the schedule that
prompted the update, as well as a [`TimelineView.Context.Cadence`](/documentation/SwiftUI/TimelineView/Context/Cadence-swift.enum)
value that the view can use to customize its appearance.

---

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)