Start working on an autoscroll view and did some icloud stuff
This commit is contained in:
parent
8867a4e1ae
commit
9cf6674de8
@ -34,6 +34,7 @@
|
||||
46D3E1402C26D6430060722E /* Constants.swift in Sources */ = {isa = PBXBuildFile; fileRef = 46D3E13E2C26D6430060722E /* Constants.swift */; };
|
||||
46D3E1422C27DD5D0060722E /* SettingsView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 46D3E1412C27DD5C0060722E /* SettingsView.swift */; };
|
||||
46D3E1442C27DFCE0060722E /* Preferences.swift in Sources */ = {isa = PBXBuildFile; fileRef = 46D3E1432C27DFCE0060722E /* Preferences.swift */; };
|
||||
46D3E1462C27EC3B0060722E /* AutoScrollView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 46D3E1452C27EC3B0060722E /* AutoScrollView.swift */; };
|
||||
46E5FFD92C26A50D001191C9 /* CueCardViewPresenter.swift in Sources */ = {isa = PBXBuildFile; fileRef = 46E5FFD82C26A50D001191C9 /* CueCardViewPresenter.swift */; };
|
||||
/* End PBXBuildFile section */
|
||||
|
||||
@ -85,6 +86,8 @@
|
||||
46D3E13E2C26D6430060722E /* Constants.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Constants.swift; sourceTree = "<group>"; };
|
||||
46D3E1412C27DD5C0060722E /* SettingsView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SettingsView.swift; sourceTree = "<group>"; };
|
||||
46D3E1432C27DFCE0060722E /* Preferences.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Preferences.swift; sourceTree = "<group>"; };
|
||||
46D3E1452C27EC3B0060722E /* AutoScrollView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AutoScrollView.swift; sourceTree = "<group>"; };
|
||||
46D3E1472C27FAFC0060722E /* OnCue.entitlements */ = {isa = PBXFileReference; lastKnownFileType = text.plist.entitlements; path = OnCue.entitlements; sourceTree = "<group>"; };
|
||||
46E5FFD82C26A50D001191C9 /* CueCardViewPresenter.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CueCardViewPresenter.swift; sourceTree = "<group>"; };
|
||||
/* End PBXFileReference section */
|
||||
|
||||
@ -128,6 +131,7 @@
|
||||
46AD30B92C26557500486C25 /* OnCue */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
46D3E1472C27FAFC0060722E /* OnCue.entitlements */,
|
||||
46AD30BA2C26557500486C25 /* OnCueApp.swift */,
|
||||
46AD30E82C266AB900486C25 /* View */,
|
||||
46AD30E02C2656B900486C25 /* Model */,
|
||||
@ -212,6 +216,7 @@
|
||||
46AD30F32C267D6400486C25 /* PreviewData.swift */,
|
||||
46D3E13E2C26D6430060722E /* Constants.swift */,
|
||||
46D3E1432C27DFCE0060722E /* Preferences.swift */,
|
||||
46D3E1452C27EC3B0060722E /* AutoScrollView.swift */,
|
||||
);
|
||||
path = Shared;
|
||||
sourceTree = "<group>";
|
||||
@ -320,6 +325,7 @@
|
||||
files = (
|
||||
46AD30F82C2689B900486C25 /* ProjectSlideshowView.swift in Sources */,
|
||||
46AD30EF2C266F1900486C25 /* NewProjectForm.swift in Sources */,
|
||||
46D3E1462C27EC3B0060722E /* AutoScrollView.swift in Sources */,
|
||||
46AD30F62C26823B00486C25 /* AddNewCardView.swift in Sources */,
|
||||
464787CB2C269CAF00A9C462 /* TeleprompterView.swift in Sources */,
|
||||
46AD30ED2C266C0B00486C25 /* CardsView.swift in Sources */,
|
||||
@ -487,12 +493,14 @@
|
||||
ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES;
|
||||
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
|
||||
ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor;
|
||||
CODE_SIGN_ENTITLEMENTS = OnCue/OnCue.entitlements;
|
||||
CODE_SIGN_STYLE = Automatic;
|
||||
CURRENT_PROJECT_VERSION = 1;
|
||||
DEVELOPMENT_ASSET_PATHS = "\"OnCue/Preview Content\"";
|
||||
DEVELOPMENT_TEAM = 9MP5435PRF;
|
||||
ENABLE_PREVIEWS = YES;
|
||||
GENERATE_INFOPLIST_FILE = YES;
|
||||
INFOPLIST_KEY_CFBundleDisplayName = OnCue;
|
||||
INFOPLIST_KEY_UIApplicationSceneManifest_Generation = YES;
|
||||
INFOPLIST_KEY_UIApplicationSupportsIndirectInputEvents = YES;
|
||||
INFOPLIST_KEY_UILaunchScreen_Generation = YES;
|
||||
@ -503,7 +511,7 @@
|
||||
"@executable_path/Frameworks",
|
||||
);
|
||||
MARKETING_VERSION = 1.0;
|
||||
PRODUCT_BUNDLE_IDENTIFIER = xyz.breadone.OnCue;
|
||||
PRODUCT_BUNDLE_IDENTIFIER = xyz.breadone.oncue;
|
||||
PRODUCT_NAME = "$(TARGET_NAME)";
|
||||
SUPPORTED_PLATFORMS = "iphoneos iphonesimulator";
|
||||
SUPPORTS_MACCATALYST = NO;
|
||||
@ -521,12 +529,14 @@
|
||||
ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES;
|
||||
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
|
||||
ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor;
|
||||
CODE_SIGN_ENTITLEMENTS = OnCue/OnCue.entitlements;
|
||||
CODE_SIGN_STYLE = Automatic;
|
||||
CURRENT_PROJECT_VERSION = 1;
|
||||
DEVELOPMENT_ASSET_PATHS = "\"OnCue/Preview Content\"";
|
||||
DEVELOPMENT_TEAM = 9MP5435PRF;
|
||||
ENABLE_PREVIEWS = YES;
|
||||
GENERATE_INFOPLIST_FILE = YES;
|
||||
INFOPLIST_KEY_CFBundleDisplayName = OnCue;
|
||||
INFOPLIST_KEY_UIApplicationSceneManifest_Generation = YES;
|
||||
INFOPLIST_KEY_UIApplicationSupportsIndirectInputEvents = YES;
|
||||
INFOPLIST_KEY_UILaunchScreen_Generation = YES;
|
||||
@ -537,7 +547,7 @@
|
||||
"@executable_path/Frameworks",
|
||||
);
|
||||
MARKETING_VERSION = 1.0;
|
||||
PRODUCT_BUNDLE_IDENTIFIER = xyz.breadone.OnCue;
|
||||
PRODUCT_BUNDLE_IDENTIFIER = xyz.breadone.oncue;
|
||||
PRODUCT_NAME = "$(TARGET_NAME)";
|
||||
SUPPORTED_PLATFORMS = "iphoneos iphonesimulator";
|
||||
SUPPORTS_MACCATALYST = NO;
|
||||
@ -562,13 +572,13 @@
|
||||
GENERATE_INFOPLIST_FILE = YES;
|
||||
INFOPLIST_KEY_CFBundleDisplayName = OnCuePresenter;
|
||||
INFOPLIST_KEY_UISupportedInterfaceOrientations = "UIInterfaceOrientationPortrait UIInterfaceOrientationPortraitUpsideDown";
|
||||
INFOPLIST_KEY_WKCompanionAppBundleIdentifier = xyz.breadone.OnCue;
|
||||
INFOPLIST_KEY_WKCompanionAppBundleIdentifier = xyz.breadone.oncue;
|
||||
LD_RUNPATH_SEARCH_PATHS = (
|
||||
"$(inherited)",
|
||||
"@executable_path/Frameworks",
|
||||
);
|
||||
MARKETING_VERSION = 1.0;
|
||||
PRODUCT_BUNDLE_IDENTIFIER = xyz.breadone.OnCue.watchkitapp;
|
||||
PRODUCT_BUNDLE_IDENTIFIER = xyz.breadone.oncue.watchkitapp;
|
||||
PRODUCT_NAME = "$(TARGET_NAME)";
|
||||
SDKROOT = watchos;
|
||||
SKIP_INSTALL = YES;
|
||||
@ -592,13 +602,13 @@
|
||||
GENERATE_INFOPLIST_FILE = YES;
|
||||
INFOPLIST_KEY_CFBundleDisplayName = OnCuePresenter;
|
||||
INFOPLIST_KEY_UISupportedInterfaceOrientations = "UIInterfaceOrientationPortrait UIInterfaceOrientationPortraitUpsideDown";
|
||||
INFOPLIST_KEY_WKCompanionAppBundleIdentifier = xyz.breadone.OnCue;
|
||||
INFOPLIST_KEY_WKCompanionAppBundleIdentifier = xyz.breadone.oncue;
|
||||
LD_RUNPATH_SEARCH_PATHS = (
|
||||
"$(inherited)",
|
||||
"@executable_path/Frameworks",
|
||||
);
|
||||
MARKETING_VERSION = 1.0;
|
||||
PRODUCT_BUNDLE_IDENTIFIER = xyz.breadone.OnCue.watchkitapp;
|
||||
PRODUCT_BUNDLE_IDENTIFIER = xyz.breadone.oncue.watchkitapp;
|
||||
PRODUCT_NAME = "$(TARGET_NAME)";
|
||||
SDKROOT = watchos;
|
||||
SKIP_INSTALL = YES;
|
||||
|
16
OnCue/OnCue.entitlements
Normal file
16
OnCue/OnCue.entitlements
Normal file
@ -0,0 +1,16 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
||||
<plist version="1.0">
|
||||
<dict>
|
||||
<key>aps-environment</key>
|
||||
<string>development</string>
|
||||
<key>com.apple.developer.icloud-container-identifiers</key>
|
||||
<array>
|
||||
<string>iCloud.xyz.breadone.oncue</string>
|
||||
</array>
|
||||
<key>com.apple.developer.icloud-services</key>
|
||||
<array>
|
||||
<string>CloudKit</string>
|
||||
</array>
|
||||
</dict>
|
||||
</plist>
|
53
Shared/AutoScrollView.swift
Normal file
53
Shared/AutoScrollView.swift
Normal file
@ -0,0 +1,53 @@
|
||||
//
|
||||
// AutoScrollView.swift
|
||||
// OnCue
|
||||
//
|
||||
// Created by Pradyun Setti on 23/06/2024.
|
||||
//
|
||||
|
||||
import SwiftUI
|
||||
import SwiftData
|
||||
|
||||
struct AutoScrollView<Content: View>: View {
|
||||
let content: Content
|
||||
var scrollSpeed: Double = 15.0
|
||||
|
||||
@State private var offset: Double = 0.0
|
||||
|
||||
init(scrollSpeed: Double = 0, @ViewBuilder _ content: () -> Content) {
|
||||
self.content = content()
|
||||
self.scrollSpeed = scrollSpeed
|
||||
}
|
||||
|
||||
var body: some View {
|
||||
ScrollView {
|
||||
content
|
||||
.offset(y: offset)
|
||||
}
|
||||
}
|
||||
|
||||
func startScrolling() {
|
||||
|
||||
}
|
||||
|
||||
func stopScrolling() {
|
||||
|
||||
}
|
||||
|
||||
mutating func setScrollSpeed(_ speed: Double) {
|
||||
self.scrollSpeed = speed
|
||||
}
|
||||
}
|
||||
|
||||
#Preview {
|
||||
let config = ModelConfiguration(isStoredInMemoryOnly: true)
|
||||
let container = try! ModelContainer(for: OCProject.self, configurations: config)
|
||||
|
||||
container.mainContext.insert(PreviewData.project)
|
||||
|
||||
return AutoScrollView {
|
||||
Text(PreviewData.project.script)
|
||||
.font(.system(size: 45))
|
||||
.padding(.horizontal)
|
||||
}
|
||||
}
|
Loading…
x
Reference in New Issue
Block a user