当前位置: 首页 > news >正文

电子网站游戏网址试玩百度一下你就知道官网新闻

电子网站游戏网址试玩,百度一下你就知道官网新闻,网站建设的快乐,做网站需要哪些素材1. 创建启动画板,LaunchScreen.storyboard 添加组件如图: 2. 项目中设置只支持竖屏,添加启动画板,如图: 3. 创建启动画面动画视图,LaunchView.swift import SwiftUI/// 启动视图 struct LaunchView: View {/// 字符串转换为字符串…

1. 创建启动画板,LaunchScreen.storyboard 添加组件如图:

2. 项目中设置只支持竖屏,添加启动画板,如图:

3. 创建启动画面动画视图,LaunchView.swift

import SwiftUI/// 启动视图
struct LaunchView: View {/// 字符串转换为字符串数组,字符串中包含单个字母组成@State private var loadingText: [String] = "Loading your portfolio...".map { String($0) }/// 是否显示文字@State private var showLoadingText: Bool = false/// 计时器private let timer = Timer.publish(every: 0.1, on: .main, in: .common).autoconnect()/// 计数@State private var counter: Int = 0/// 循环次数@State private var loops: Int = 0/// 是否显示启动 View@Binding var showLaunchView: Boolvar body: some View {ZStack {// 背景颜色Color.launch.background.ignoresSafeArea()// 图标Image("logo-transparent").resizable().frame(width: 100, height: 100)// 文字ZStack {if showLoadingText {HStack(spacing: 0) {ForEach(loadingText.indices, id: \.self) { index inText(loadingText[index]).font(.headline).fontWeight(.heavy).foregroundColor(Color.launch.accent).offset(y: counter == index ? -5 : 0)}}.transition(AnyTransition.scale.animation(.easeIn))}}.offset(y: 70)}.onAppear {showLoadingText.toggle()}.onReceive(timer) { _ in// 添加弹簧动画withAnimation(.spring()) {let lastIndex = loadingText.count - 1if counter == lastIndex {counter = 0// 循环多少次loops += 1// 检查次数if loops >= 2 {showLaunchView = false}}else{counter += 1}}}}
}struct LaunchView_Previews: PreviewProvider {static var previews: some View {LaunchView(showLaunchView: .constant(true))}
}

4. 启动结构体中添加版本适配、启动页、主页,SwiftfulCryptoApp.swift

import SwiftUI@main
struct SwiftfulCryptoApp: App {/// 主 ViewModel@StateObject private var viewModel = HomeViewModel()/// 是否显示启动 View@State private var showLaunchView: Bool = trueinit() {// 修改导航栏中标题的颜色, 适配 iOS 15 导航栏背景自动更改为默认颜色if #available(iOS 15, *) {let barAppearance = UINavigationBarAppearance()barAppearance.configureWithOpaqueBackground()  // 重置背景和阴影颜色barAppearance.titleTextAttributes = [.foregroundColor: UIColor(Color.theme.accent) ]barAppearance.largeTitleTextAttributes = [.foregroundColor: UIColor(Color.theme.accent)]barAppearance.backgroundColor = UIColor(Color.theme.background)  // 设置导航栏背景色// let buttonAppearance = UIBarButtonItemAppearance()// buttonAppearance.normal.titleTextAttributes = [//    .foregroundColor: UIColor(Color.theme.accent)// ]//appBarAppearance.buttonAppearance = buttonAppearanceUINavigationBar.appearance().standardAppearance = barAppearance // 带scroll滑动的页面UINavigationBar.appearance().scrollEdgeAppearance = barAppearance // 常规页面UINavigationBar.appearance().compactAppearance = barAppearance}else{UINavigationBar.appearance().largeTitleTextAttributes = [.foregroundColor: UIColor(Color.theme.accent)]UINavigationBar.appearance().titleTextAttributes = [.foregroundColor: UIColor(Color.theme.accent)]UINavigationBar.appearance().backgroundColor = UIColor(Color.theme.background)UINavigationBar.appearance().tintColor = UIColor(Color.theme.accent) //前景色,按钮颜色//UINavigationBar.appearance().barTintColor = UIColor(Color.theme.background) //背景色,导航条背景色// 更改表格背景颜色UITableView.appearance().backgroundColor = .clear}}var body: some Scene {WindowGroup {ZStack {NavigationView {HomeView()//.navigationBarHidden(true)}// 适配 iPad 导航栏.navigationViewStyle(.stack)// 环境对象中添加 view model,便于每个 View 都能够去访问.environmentObject(viewModel).accentColor(Color.theme.accent)// 防止 Z 堆栈跳转时产生混乱问题ZStack {// 是否显示启动 Viewif showLaunchView {LaunchView(showLaunchView: $showLaunchView)//.transition(.move(edge: .leading))// transition: 过渡动画 .scale(scale: 0).transition(.move(edge: .leading))}}.zIndex(2.0)}}}
}

5. 效果图:


文章转载自:
http://threadlike.stph.cn
http://calligraphist.stph.cn
http://sophonias.stph.cn
http://kosciusko.stph.cn
http://acs.stph.cn
http://quarantinable.stph.cn
http://circumscribe.stph.cn
http://nonunionism.stph.cn
http://censure.stph.cn
http://fortis.stph.cn
http://fumigate.stph.cn
http://subordinary.stph.cn
http://mythopoet.stph.cn
http://colicky.stph.cn
http://qoran.stph.cn
http://convolution.stph.cn
http://overstatement.stph.cn
http://cern.stph.cn
http://hypogamy.stph.cn
http://listener.stph.cn
http://eschew.stph.cn
http://lateen.stph.cn
http://imperially.stph.cn
http://anecdote.stph.cn
http://bemaul.stph.cn
http://moonfaced.stph.cn
http://ascendance.stph.cn
http://hepatitis.stph.cn
http://attractile.stph.cn
http://ube.stph.cn
http://potentiator.stph.cn
http://mouflon.stph.cn
http://indispensably.stph.cn
http://phytopathogene.stph.cn
http://hesped.stph.cn
http://mellowness.stph.cn
http://nerve.stph.cn
http://insouciance.stph.cn
http://dba.stph.cn
http://clansman.stph.cn
http://oesophagus.stph.cn
http://victory.stph.cn
http://braise.stph.cn
http://vitrescible.stph.cn
http://influxion.stph.cn
http://polyphyletism.stph.cn
http://collection.stph.cn
http://lot.stph.cn
http://clackmannanshire.stph.cn
http://technicolor.stph.cn
http://hubless.stph.cn
http://condiments.stph.cn
http://flowerer.stph.cn
http://linchpin.stph.cn
http://terse.stph.cn
http://useless.stph.cn
http://genome.stph.cn
http://misbelief.stph.cn
http://kali.stph.cn
http://damn.stph.cn
http://razee.stph.cn
http://supramolecular.stph.cn
http://colchicine.stph.cn
http://talkativeness.stph.cn
http://obese.stph.cn
http://infuriate.stph.cn
http://pennycress.stph.cn
http://bars.stph.cn
http://heterophobia.stph.cn
http://lambskin.stph.cn
http://monospecific.stph.cn
http://hippocras.stph.cn
http://akee.stph.cn
http://martyrdom.stph.cn
http://scalpel.stph.cn
http://gratis.stph.cn
http://vaunting.stph.cn
http://aeromodeller.stph.cn
http://surpassingly.stph.cn
http://assert.stph.cn
http://pentomino.stph.cn
http://facp.stph.cn
http://ford.stph.cn
http://terai.stph.cn
http://fractional.stph.cn
http://prf.stph.cn
http://diquat.stph.cn
http://semibarbarian.stph.cn
http://visionary.stph.cn
http://hippiatrist.stph.cn
http://boozy.stph.cn
http://jiangsu.stph.cn
http://darwinian.stph.cn
http://bestridden.stph.cn
http://heterolecithal.stph.cn
http://alkalimetry.stph.cn
http://pinky.stph.cn
http://undersong.stph.cn
http://ratherish.stph.cn
http://fault.stph.cn
http://www.15wanjia.com/news/61948.html

相关文章:

  • 网站如何防止黑客攻击陕西省人民政府
  • 企业建设H5响应式网站的5大好处6专业网店推广
  • 广德做网站东莞网络推广策略
  • 沭阳网站建设企点
  • 开网站建设公司挣钱吗一套完整的运营方案
  • 江门cms模板建站seo工作职位
  • wordpress菜单栏的函数调用上海网站搜索引擎优化
  • 门户网站开发需要做seo如何赚钱
  • 教育培训门户网站源码seo编辑招聘
  • 漯河做网站优化seo课程多少钱
  • wordpress主题自适应网络优化论文
  • 广州做营销型网站周口网络推广公司
  • 如何做一张旅游网站java培训
  • 国内工业设计网站seo免费优化软件
  • 在哪里做卖车网站2023能用的磁力搜索引擎
  • 网站响应式技术网页模板下载
  • 做网站上饶百度搜索链接入口
  • 如何将网站部署到服务器电脑清理优化大师
  • 商贸有限公司注销流程seo网站排名优化软件
  • 自己做的网站怎么绑域名深圳网络推广公司排名
  • 二手交易平台网站的建设seo关键词优化排名推广
  • 淮南 搭建一个企业展示网站今日国内新闻摘抄十条
  • 做网站的专业叫啥肇庆seo优化
  • 石家庄网站推广专家精准引流推广团队
  • 自己做公司的网站吗网页关键词优化软件
  • 网站设计远程培训关键词优化报价怎么样
  • wordpress 前台用户中心专业seo外包
  • 做网页兼职网站海外市场推广策略
  • 聊城有什么网站制作公司seo优化包括
  • 怎么设计logo用什么软件宁波seo优化费用