Page Menu
Home
Musing Studio
Search
Configure Global Search
Log In
Files
F12272592
WriteFreely_MultiPlatformApp.swift
No One
Temporary
Actions
Download File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
1 KB
Subscribers
None
WriteFreely_MultiPlatformApp.swift
View Options
import
SwiftUI
@
main
struct
WriteFreely_MultiPlatformApp
:
App
{
@
StateObject
private
var
model
=
WriteFreelyModel
()
#if
os
(
macOS
)
@
State
private
var
selectedTab
=
0
#endif
var
body
:
some
Scene
{
WindowGroup
{
ContentView
()
.
environmentObject
(
model
)
.
environment
(
\
.
managedObjectContext
,
PersistenceManager
.
persistentContainer
.
viewContext
)
// .preferredColorScheme(preferences.selectedColorScheme) // See PreferencesModel for info.
}
#if
os
(
macOS
)
Settings
{
TabView
(
selection
:
$
selectedTab
)
{
MacAccountView
()
.
environmentObject
(
model
)
.
tabItem
{
Image
(
systemName
:
"person.crop.circle"
)
Text
(
"Account"
)
}
.
tag
(
0
)
MacPreferencesView
(
preferences
:
model
.
preferences
)
.
tabItem
{
Image
(
systemName
:
"gear"
)
Text
(
"Preferences"
)
}
.
tag
(
1
)
}
.
frame
(
minWidth
:
300
,
maxWidth
:
300
,
minHeight
:
200
,
maxHeight
:
200
)
.
padding
()
// .preferredColorScheme(preferences.selectedColorScheme) // See PreferencesModel for info.
}
#endif
}
}
File Metadata
Details
Attached
Mime Type
text/x-c
Expires
Thu, Nov 6, 4:53 AM (1 h, 52 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
3473183
Attached To
rWFSUI WriteFreely SwiftUI
Event Timeline
Log In to Comment