0
이 두 열을 선택 윤곽과 같이 자동으로 스크롤해야했습니다. 하지만이 일을하는 데 문제가 있습니다. 나는 두 가지 해결책을 찾았지만 불행히도 이들 중 어느 것도 효과가 없었다. https://github.com/cbess/AutoScrollLabel iOS Swift - UILabel을 오른쪽에서 왼쪽으로 자동 스크롤
어떤 도움
이 두 열을 선택 윤곽과 같이 자동으로 스크롤해야했습니다. 하지만이 일을하는 데 문제가 있습니다. 나는 두 가지 해결책을 찾았지만 불행히도 이들 중 어느 것도 효과가 없었다. https://github.com/cbess/AutoScrollLabel iOS Swift - UILabel을 오른쪽에서 왼쪽으로 자동 스크롤
어떤 도움
이 시도 :
let label = UILabel()
override func viewDidLoad() {
super.viewDidLoad()
label.frame = CGRectMake(320, 100, 200, 60)
label.text = "This is my music line"
self.view!.addSubview(label)
NSTimer.scheduledTimerWithTimeInterval(2.0, target: self, selector: #selector(self.LabelAnimate), userInfo: nil, repeats: true)
}
func LabelAnimate() {
UIView.animateWithDuration(3.0, delay: 0.0, options: .TransitionNone, animations: {() -> Void in
self.label.frame = CGRectMake(-320, 100, 200, 60)
}, completion: {(isDone: Bool) -> Void in
self.label.frame = CGRectMake(320, 100, 200, 60)
})
}
}