MarqueeLabel Swift无法正常工作 [英] MarqueeLabel Swift not working

查看:68
本文介绍了MarqueeLabel Swift无法正常工作的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在我的文件中包含了

I included the files from the project in mine. I also included the QuartzCore Framework in the project.

Here is my main ViewController :

class IndexViewController: UIViewController {

    @IBOutlet weak var titleLabel: MarqueeLabel!

    override func viewDidLoad() {
        super.viewDidLoad()

        // Continuous Type
        titleLabel.tag = 101
        titleLabel.type = .Continuous
        titleLabel.scrollDuration = 15.0
        titleLabel.animationCurve = .EaseInOut
        titleLabel.fadeLength = 10.0
        titleLabel.leadingBuffer = 30.0
        titleLabel.trailingBuffer = 20.0

        // ...
    }
}

When I try to simulate the project, I get the following error :

titleLabel.type = .Continuous Thead 1: EXC_BAD_ACCESS (code=1, address=0x10002)

Where I'm wrong ?

解决方案

Check in Interface Builder that your label's custom class is set to MarqueeLabel.

这篇关于MarqueeLabel Swift无法正常工作的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆