Closed minuscorp closed 8 years ago
This is already supported, you should be able to set all the UILabel text properties that are normally configurable via IB. You use the standard UILabel options in the inspector pane though, they're not in the MarqueeLabel-specific section at the top.
Now if you mean to say the settings you specify don't work, then that is of course an issue.
Is strange, IB UILabel specific attributes (font, color) doesn't take effect when it inherits from MarqueeLabel and I have to set all this properties:
cell.routeUsername.text = row.userName
cell.routeUsername.textColor = .whiteColor()
cell.routeUsername.font = UIFont(name: "Titillium-Regular", size: 17)!
cell.routeUsername.marqueeType = .MLContinuous
cell.routeUsername.scrollDuration = 15.0
cell.routeUsername.animationCurve = UIViewAnimationOptions.CurveEaseOut
cell.routeUsername.fadeLength = 10.0
cell.routeUsername.leadingBuffer = 10.0
cell.routeUsername.trailingBuffer = 10.0
where that routeUsername is a MarqueeLabel
IBOutlet
from the IB before they actually takes the properties set in it.
Ah OK, good to know. That being Swift code, it might be specific to the Swift version though. I'll try it out with both versions later.
Hmm, I have no issue setting the font and text color in the demo projects, in Objective-C or Swift. That includes the tvOS demo, which uses a MarqueeLabel in a prototype cell. Do you have all your IBOutlets connected, and/or your cell identifier specified in the appropriate places?
@minuscorp did you ever find the cause of your problem on this?
No... I solved it just adding more porperties as I wrote and it just started to work, I think this can be closed by now
Cool, glad it works now!
The examples of the library only seems to support attributedText, but why I can't set the attributes of the text (like font and color) directly from the Interface Builder, for example?