gpt4 book ai didi

ios - 线程 1 : EXC_BAD_ACCESS (code=2, 地址=0x1083cfea8)

转载 作者:行者123 更新时间:2023-11-28 07:43:38 25 4
gpt4 key购买 nike

当我添加 paperOnboarding pod 时,构建并运行我的 swift 程序。成功后,我的应用程序崩溃并出现线程。寻求帮助以解决此问题。非常感谢。

enter image description here

线程 1:ViewController.viewDidload

 //titleArray = ["picture 1","picture 2","picture 3","picture 4","picture 5","picture 6","picture 7","picture 8","picture 9","picture 10","picture 11"]
carouselView.delegate = self
carouselView.setCarouselData(paths: pathArray, describedTitle: titleArray, isAutoScroll: true, timer: 3.0, defaultImage: "defaultImage")
//optional method
carouselView.setCarouselOpaque(layer: true, describedTitle: false, pageIndicator: true)
carouselView.setCarouselLayout(displayStyle: 2, pageIndicatorPositon: 2, pageIndicatorColor: UIColor.gray, describedTitleColor: nil, layerColor: nil)
}

线程 1:34 UIApplication Main

  0x109aa4057 <+159>: movq   0x115b602(%rip), %rbx     ; (void *)0x0000000108319d00: objc_release

线程 1:35 主

class AppDelegate: UIResponder, UIApplicationDelegate {

线程 1:36 主要

  0x10e822955 <+1>: movl   %eax, %edi

ViewDidload

 @IBOutlet weak var carouselView: AACarousel!

var titleArray = [String]()

override func viewDidLoad() {
super.viewDidLoad()

let pathArray = [
//array of images here

]


carouselView.delegate = self
carouselView.setCarouselData(paths: pathArray, describedTitle: titleArray, isAutoScroll: true, timer: 3.0, defaultImage: "defaultImage")
// optional method
carouselView.setCarouselOpaque(layer: true, describedTitle: false, pageIndicator: true)
carouselView.setCarouselLayout(displayStyle: 2, pageIndicatorPositon: 2, pageIndicatorColor: UIColor.gray, describedTitleColor: nil, layerColor: nil)
}

func startAutoScroll() {
//optional method
carouselView.startScrollImageView()

}

func stopAutoScroll() {
//optional method
carouselView.stopScrollImageView()
}

override func didReceiveMemoryWarning() {
super.didReceiveMemoryWarning()
// Dispose of any resources that can be recreated.
}

AppDelegate.swift

这是我的“AppDelegate.swift”文件的初始部分“KingFisher”是我添加的唯一代码。

import UIKit
import Kingfisher

最佳答案

转到 storyBoard 并选择您的 View carouselView 并为此类设置“AACarousel”。

关于ios - 线程 1 : EXC_BAD_ACCESS (code=2, 地址=0x1083cfea8),我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/51552125/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com