I want to show some text in my app like moving text (Scrolling with animation from right to left). How to do this programmatically?
I took UIViewcontroller
IN Swift you can implement it like this
override func viewDidLoad() {
super.viewDidLoad()
marqueeLabel = UILabel(frame: CGRectMake(320, 100, 400, 60))
marqueeLabel.text = "Your music title here"
self.view.addSubview(marqueeLabel)
UIView.animateWithDuration(10.0, delay: 0.0, options: [.Repeat], animations: { () -> Void in
self.marqueeLabel.frame = CGRectMake(-320, 100, 400, 60)
}, completion: { (finished: Bool) -> Void in
self.marqueeLabel.frame = CGRectMake(320, 100, 400, 60)
});
}