标签: xcode11

SwiftUI:导航链接在滚动视图中不起作用

我已经在 List 中嵌套了一个 ScrollView 并且该 ScrollView 包含一个 NavigationLink,当用户点击链接时,链接不会导航到目的地。

var body: some View {

    NavigationView {
            List {

                HeaderSection()
                VStack(alignment: .leading) {
                    Text(title.explore)
                        .font(.custom(App.fontBold, size: 21.0))
                        .fontWeight(.medium)
                        .foregroundColor(.white)
                        .padding(.top, 5.0)
                        .padding(.bottom, 5.0)
                        ScrollView(.horizontal, showsIndicators: false) {
                             HStack {
                                ForEach(self.viewModel.photos) { photo in
                                    NavigationLink(destination: ExploreDetails(photo: photo)) {
                                        ExploreView(photo: photo)
                                    }
                                 }
                            }
                        }
                }

                ForEach(viewModel.photos) { photo in
                        ImageRow(photo: photo)
                            .onTapGesture {
                                self.showModal.toggle()
                                self.selectedPhoto = photo
                        }

                }.listRowInsets(EdgeInsets())

            }
            .navigationBarItems(trailing: profileButton)
            .edgesIgnoringSafeArea(.vertical)
            .sheet(isPresented: self.$showModal, onDismiss:{ print("dissmiss")} ) {
               ContentDetailsView(photo: self.selectedPhoto!)
            }
    } …
Run Code Online (Sandbox Code Playgroud)

listview scrollview ios swiftui xcode11

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

Swift 包管理器:依赖 iOS 版本

我正在尝试使用 xCode11 beta 7构建具有外部依赖项 ( CoreStore ) 的swift 包。我的包针对 iOS11+,它在Package.swift以下位置声明:

// swift-tools-version:5.1
// The swift-tools-version declares the minimum version of Swift required to build this package.

import PackageDescription

let package = Package(
    name: "Storages",
    platforms: [.iOS(.v11)],
    products: [
        // Products define the executables and libraries produced by a package, and make them visible to other packages.
        .library(
            name: "Storages",
            targets: ["Storages"]),
    ],
    dependencies: [
        // Dependencies declare other packages that this package depends on.
        .package(url: "https://github.com/JohnEstropia/CoreStore.git", from: "6.3.0") …
Run Code Online (Sandbox Code Playgroud)

swift swift-package-manager corestore xcode11

5
推荐指数
2
解决办法
2100
查看次数

SwiftUI 文本不会扩展为多行

我刚刚开始在零售版本中使用 SwiftUI。我无法让我的文本视图之一自动扩展为多行。我已经阅读了很多关于 SO 和 HackingWithSwift 的线程,但无法让它工作。我想也许它可能与我的其他框架有关,但我不确定从哪里开始

struct Message: View {
    var body: some View {
        ZStack() {
            Color.blue.cornerRadius(8)
            VStack(alignment: .leading, spacing: 8) {
                Text("Lorem Ipsum")
                    .foregroundColor(.white)
                    .bold()
                    .font(.system(size: 20))
                Text("Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Donec enim diam vulputate ut pharetra. Sed turpis tincidunt id aliquet risus feugiat in. Interdum velit laoreet id donec ultrices tincidunt arcu non.  Lorem END")
                    .foregroundColor(.white)
                    .lineLimit(nil)
                Text("Sent to Group1 by iShaymus") …
Run Code Online (Sandbox Code Playgroud)

ios swift swiftui xcode11

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

Xcode 11 中的差异在哪里?

在以前的版本中,很容易从任何特定提交中区分我的代码和代码。但是 Xcode 11 中的这个按钮在哪里?!只有作者按钮。 在此处输入图片说明

xcode git-diff xcode11

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

UITableViewAutomaticDimension 不适用于具有特征变化的 Xcode 11 和 iOS 13

我在xib 中有注册到tableView 的视图并通过UITableViewAutomaticDimension 计算高度。并且在更新到 Xcode 11 和 iOS 13 之前一切正常,现在高度小且不正确。

我注意到,如果我删除所有约束特征变化,它似乎又可以工作了。但是,如果我为约束添加至少一个特征变化(无论是水平还是垂直) 如这张图片 正如这张图片

即使有两次检查,它也会中断。但是这种变化效果很好,不会破坏布局

但是这种变化效果很好,不会破坏布局.

也许是 Xcode 中的 bug 之类的。有没有人遇到过这个问题?

traits uitableview autolayout ios13 xcode11

5
推荐指数
0
解决办法
455
查看次数

iOS 13 UIBackgroundTaskIdentifier

无法结束 BackgroundTask:不存在带有 identifier 的后台任务,或者它可能已经结束。中断 UIApplicationEndBackgroundTaskError() 进行调试。

self.backgroundTaskIdentifier = UIApplication.shared.beginBackgroundTask(expirationHandler: {
     if self.backgroundTaskIdentifier != UIBackgroundTaskIdentifier.invalid{
                UIApplication.shared.endBackgroundTask(self.backgroundTaskIdentifier!)
                self.backgroundTaskIdentifier = UIBackgroundTaskIdentifier.invalid
            }
})
Run Code Online (Sandbox Code Playgroud)

ios13 xcode11 swift5.1

5
推荐指数
0
解决办法
741
查看次数

升级到 iOS 13.1 和 Xcode 11 后,Flutter 无法在 iPhone 上安装应用程序

今天我有一个好主意将我的 iPhone 更新到 iOS 13 并将 Xcode 更新到版本 11 ......(为什么不去喝杯茶呢?!?)

所以现在我无法再在我的 iPhone 中安装我在 flutter 中开发的应用程序。这是日志

2019-09-27 14:10:46.945 ios-deploy[8xxx2:9xxx95] [ !! ] Error 0xe800007f: Device doesn't support wireless sync. AMDeviceStartService(device, CFSTR("com.apple.debugserver"), &gdbfd, NULL)
Could not install build/ios/iphoneos/Runner.app on f7xxx37xxxxb5299ef.
Try launching Xcode and selecting "Product > Run" to fix the problem:
  open ios/Runner.xcworkspace

Error launching application on xxx's iPhone.
Run Code Online (Sandbox Code Playgroud)

如果我使用 Xcode 运行该应用程序,它可以正常工作,但 flutter 不起作用

我看过这个页面,我认为他们在谈论同样的问题,但我不确定我需要做什么来解决......

有没有专家可以建议怎么做??谢谢

flutter ios13 xcode11

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

IOS 模拟器在运行 iOS 13.0 设备时崩溃

IOS 模拟器在运行 iOS 13.0 设备时崩溃,

使用 XCode 11.0

Mojave 10.14.6 在 VirtualBox 6.0.12 中作为 VM 运行

iOS 12.2 模拟器运行正常。

任何想法如何解决这一问题?

在此处输入图片说明

ios-simulator macos-mojave ios13 xcode11

5
推荐指数
2
解决办法
2411
查看次数

更新到 Xcode 11 后,CGAffineTransform 翻译在标签栏上不起作用

我正在尝试将我的项目更新到 iOS 13。我曾经使用 CGAffineTransform 翻译隐藏选项卡栏,并且在我更新到 Xcode 11 并在 iOS 13 上执行我的代码之前,它就像一个魅力。

我尝试用一​​个简单的 UITabBarController 和一个简单的 UIViewController 重新创建一个小项目,并带有一个按钮来显示/隐藏我的标签栏。(见下文)。

甚至向身份的转变也没有按预期进行。

其他 CGAffineTransform 像旋转一样按预期工作。

@objc fileprivate func showOrHideTabbar() {

        if !hidden {
            print("hiding")
            UIView.animate(withDuration: 0.7, delay: 0, options: .curveEaseOut, animations: {
                self.tabBarController?.tabBar.transform = CGAffineTransform(translationX: 0, y: 100)
            })
        } else {
            print("showing")
            UIView.animate(withDuration: 0.7, delay: 0, options: .curveEaseOut, animations: {
                self.tabBarController?.tabBar.transform = .identity
            })
        }
        hidden = !hidden
    }
Run Code Online (Sandbox Code Playgroud)

cgaffinetransform swift ios13 xcode11

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

Xcode 11 无法启动 CarPlay 音频应用程序

在 Xcode 11 GM 版本中无法在模拟器中启动 Car Play 音频应用程序。模拟器卡在加载屏幕上,然后显示“无法连接”错误。有时在应用程序启动时仅显示黑屏或崩溃。

在调试时,我看到 MPPlayableContentDataSource 和 MPPlayableContentDelegate 中的方法不会触发。在 Xcode 10 上一切正常,所以它看起来像是新 Xcode 11 中的一些错误。也许有人知道如何解决这个问题?

确实谢谢。

连接问题

carplay xcode11

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