Source code for the WriteFreely SwiftUI app for iOS, iPadOS, and macOS
Ви не можете вибрати більше 25 тем
Теми мають розпочинатися з літери або цифри, можуть містити дефіси (-) і не повинні перевищувати 35 символів.
|
- import SwiftUI
-
- struct SidebarView: View {
- var body: some View {
- CollectionListView()
- }
- }
-
- struct SidebarView_Previews: PreviewProvider {
- static var previews: some View {
- let userCollection1 = WFACollection(context: PersistenceManager.persistentContainer.viewContext)
- let userCollection2 = WFACollection(context: PersistenceManager.persistentContainer.viewContext)
- let userCollection3 = WFACollection(context: PersistenceManager.persistentContainer.viewContext)
- userCollection1.title = "Collection 1"
- userCollection2.title = "Collection 2"
- userCollection3.title = "Collection 3"
-
- let model = WriteFreelyModel()
- model.collections = CollectionListModel()
-
- return SidebarView()
- .environmentObject(model)
- .environment(\.managedObjectContext, PersistenceManager.persistentContainer.viewContext)
- }
- }
|