当我添加paperOnboarding
窗格时,构建并运行我的swift程序。成功后,我的应用程序崩溃了,线程出现了。寻求帮助来解决此问题。非常感谢。
线程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
答案 0 :(得分:0)
转到storyBoard并选择您的视图carouselView并将“ AACarousel”设置为此类。