小编Zud*_*iku的帖子

Xcode 无法推送文件,因为“与服务的通信已中断”

我一直在尝试将我的项目从 xcode 推送到 github,但它不断给我一条错误消息,表明与服务的通信已中断。以前的提交和推送都有效,但现在坏了。我已经尝试过重新启动计算机和 Xcode,但仍然无法正常工作。我正在尝试用一些视频文件在这里推送大约 4-5 个提交。我在这里看到了类似的问题,但解决方案并没有真正帮助。

在此输入图像描述

每当我尝试推送时,在长时间加载后都会收到此错误消息。提交有效,但推送无效。

git xcode github xcode14

5
推荐指数
1
解决办法
2129
查看次数

SwiftUI-有没有办法从另一个视图返回主屏幕而不出现后退按钮?

我正在尝试制作一个锻炼应用程序,当用户完成一组锻炼时,我希望他们能够按下按钮返回主屏幕。

总共有 5 个练习,因此我制作了 5 个练习视图,显示 5 个不同的练习,每个练习视图底部都有一个导航链接,可引导到下一个练习。当用户完成最后一个练习时,我希望底部的按钮将他们带回主屏幕,但当我这样做时,顶部会有一个后退按钮。有没有办法在没有后退按钮的情况下从该视图返回主屏幕?

最后一个练习屏幕的代码:

import SwiftUI
import AVKit

struct ExerciseScreen5View: View {
    
    var countdownTimer = 300
    @State var player = AVPlayer()
    var exercisePlan: ExercisePlan
    
    var body: some View {
        VStack {
            
            Text(exercisePlan.exercise5.title)
                .font(.system(size: 35, weight: .medium))
                .padding(EdgeInsets(top: 0, leading: 0, bottom: 0, trailing: 0))
            
            VideoPlayer(player: exercisePlan.exercise5.video)
                .scaledToFit()
                .frame(alignment: .center)
                .cornerRadius(10)
                .padding(EdgeInsets(top: 0, leading: 0, bottom: 0, trailing: 0))
            
            Text(exercisePlan.exercise5.steps)
                .font(.system(size: 20, weight: .regular))
                .padding()
                .frame(alignment: .center)
            
            
            TimerView()
                .padding(EdgeInsets(top: 0, leading: 0, bottom: 35, trailing: 0)) …
Run Code Online (Sandbox Code Playgroud)

ios swift navigationview swiftui swiftui-navigationlink

5
推荐指数
1
解决办法
2462
查看次数