Enhance app launch experience by introducing a launch screen that displays for 3 seconds before transitioning to the main content. Update Info.plist to include new app display name and additional localization support for Japanese, Korean, French, German, Spanish, Italian, Portuguese, Russian, and Thai. Add camera usage description for QR code scanning functionality.
parent
57138cece0
commit
2afedafb8a
@ -0,0 +1,76 @@
|
||||
import SwiftUI
|
||||
|
||||
struct LaunchScreenView: View {
|
||||
@State private var isAnimating = false
|
||||
|
||||
var body: some View {
|
||||
ZStack {
|
||||
// 背景渐变
|
||||
LinearGradient(
|
||||
gradient: Gradient(colors: [
|
||||
Color(red: 0.1, green: 0.2, blue: 0.4),
|
||||
Color(red: 0.2, green: 0.3, blue: 0.6)
|
||||
]),
|
||||
startPoint: .topLeading,
|
||||
endPoint: .bottomTrailing
|
||||
)
|
||||
.ignoresSafeArea()
|
||||
|
||||
VStack(spacing: 30) {
|
||||
// 应用图标
|
||||
ZStack {
|
||||
Circle()
|
||||
.fill(Color.white.opacity(0.2))
|
||||
.frame(width: 120, height: 120)
|
||||
.scaleEffect(isAnimating ? 1.1 : 1.0)
|
||||
.animation(.easeInOut(duration: 2.0).repeatForever(autoreverses: true), value: isAnimating)
|
||||
|
||||
// QR码图标
|
||||
Image(systemName: "qrcode")
|
||||
.font(.system(size: 60, weight: .light))
|
||||
.foregroundColor(.white)
|
||||
.rotationEffect(.degrees(isAnimating ? 360 : 0))
|
||||
.animation(.linear(duration: 3.0).repeatForever(autoreverses: false), value: isAnimating)
|
||||
}
|
||||
|
||||
// 应用名称
|
||||
VStack(spacing: 8) {
|
||||
Text("MyQrCode")
|
||||
.font(.system(size: 32, weight: .bold, design: .rounded))
|
||||
.foregroundColor(.white)
|
||||
|
||||
Text("QR Code Scanner & Generator")
|
||||
.font(.system(size: 16, weight: .medium))
|
||||
.foregroundColor(.white.opacity(0.8))
|
||||
}
|
||||
.opacity(isAnimating ? 1.0 : 0.0)
|
||||
.animation(.easeIn(duration: 1.0).delay(0.5), value: isAnimating)
|
||||
|
||||
// 加载指示器
|
||||
HStack(spacing: 8) {
|
||||
ForEach(0..<3) { index in
|
||||
Circle()
|
||||
.fill(Color.white)
|
||||
.frame(width: 8, height: 8)
|
||||
.scaleEffect(isAnimating ? 1.2 : 0.8)
|
||||
.animation(
|
||||
.easeInOut(duration: 0.6)
|
||||
.repeatForever(autoreverses: true)
|
||||
.delay(Double(index) * 0.2),
|
||||
value: isAnimating
|
||||
)
|
||||
}
|
||||
}
|
||||
.opacity(isAnimating ? 1.0 : 0.0)
|
||||
.animation(.easeIn(duration: 1.0).delay(1.0), value: isAnimating)
|
||||
}
|
||||
}
|
||||
.onAppear {
|
||||
isAnimating = true
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#Preview {
|
||||
LaunchScreenView()
|
||||
}
|
@ -0,0 +1,9 @@
|
||||
/*
|
||||
InfoPlist.strings
|
||||
MyQrCode
|
||||
|
||||
Created by dev on 2025/8/28.
|
||||
*/
|
||||
|
||||
"CFBundleDisplayName" = "MyQrCode";
|
||||
"CFBundleName" = "MyQrCode";
|
@ -0,0 +1,9 @@
|
||||
/*
|
||||
InfoPlist.strings
|
||||
MyQrCode
|
||||
|
||||
Created by dev on 2025/8/28.
|
||||
*/
|
||||
|
||||
"CFBundleDisplayName" = "MyQrCode";
|
||||
"CFBundleName" = "MyQrCode";
|
@ -0,0 +1,9 @@
|
||||
/*
|
||||
InfoPlist.strings
|
||||
MyQrCode
|
||||
|
||||
Created by dev on 2025/8/28.
|
||||
*/
|
||||
|
||||
"CFBundleDisplayName" = "MyQrCode";
|
||||
"CFBundleName" = "MyQrCode";
|
@ -0,0 +1,9 @@
|
||||
/*
|
||||
InfoPlist.strings
|
||||
MyQrCode
|
||||
|
||||
Created by dev on 2025/8/28.
|
||||
*/
|
||||
|
||||
"CFBundleDisplayName" = "MyQrCode";
|
||||
"CFBundleName" = "MyQrCode";
|
@ -0,0 +1,9 @@
|
||||
/*
|
||||
InfoPlist.strings
|
||||
MyQrCode
|
||||
|
||||
Created by dev on 2025/8/28.
|
||||
*/
|
||||
|
||||
"CFBundleDisplayName" = "MyQrCode";
|
||||
"CFBundleName" = "MyQrCode";
|
@ -0,0 +1,9 @@
|
||||
/*
|
||||
InfoPlist.strings
|
||||
MyQrCode
|
||||
|
||||
Created by dev on 2025/8/28.
|
||||
*/
|
||||
|
||||
"CFBundleDisplayName" = "MyQrCode";
|
||||
"CFBundleName" = "MyQrCode";
|
@ -0,0 +1,9 @@
|
||||
/*
|
||||
InfoPlist.strings
|
||||
MyQrCode
|
||||
|
||||
Created by dev on 2025/8/28.
|
||||
*/
|
||||
|
||||
"CFBundleDisplayName" = "MyQrCode";
|
||||
"CFBundleName" = "MyQrCode";
|
@ -0,0 +1,9 @@
|
||||
/*
|
||||
InfoPlist.strings
|
||||
MyQrCode
|
||||
|
||||
Created by dev on 2025/8/28.
|
||||
*/
|
||||
|
||||
"CFBundleDisplayName" = "MyQrCode";
|
||||
"CFBundleName" = "MyQrCode";
|
@ -0,0 +1,9 @@
|
||||
/*
|
||||
InfoPlist.strings
|
||||
MyQrCode
|
||||
|
||||
Created by dev on 2025/8/28.
|
||||
*/
|
||||
|
||||
"CFBundleDisplayName" = "MyQrCode";
|
||||
"CFBundleName" = "MyQrCode";
|
@ -0,0 +1,9 @@
|
||||
/*
|
||||
InfoPlist.strings
|
||||
MyQrCode
|
||||
|
||||
Created by dev on 2025/8/28.
|
||||
*/
|
||||
|
||||
"CFBundleDisplayName" = "MyQrCode";
|
||||
"CFBundleName" = "MyQrCode";
|
@ -0,0 +1,9 @@
|
||||
/*
|
||||
InfoPlist.strings
|
||||
MyQrCode
|
||||
|
||||
Created by dev on 2025/8/28.
|
||||
*/
|
||||
|
||||
"CFBundleDisplayName" = "MyQrCode";
|
||||
"CFBundleName" = "MyQrCode";
|
Loading…
Reference in new issue