-
Notifications
You must be signed in to change notification settings - Fork 2.2k
[ASButtonNode] Title is truncated in ASButtonNode #1865
Comments
@suomalainen9890 thanks for reporting this! It should be fixed by this PR: #1863 Could you test it out locally? If you're able to provide a test project, we can verify it for you. The PR mentioned should land in the next day, and will be in the next release. cc @maicki |
@appleguy : Thanks! Does it mean that I need to use this in the Podfile? I have never tried to do similar thing before. |
@suomalainen9890 Can you please try to use this in your Podfile:
|
@maicki : thanks! I will try. |
@maicki @appleguy : This is sample project, less than 100 lines of code. I could be doing something wrong here. Please take a look: https://github.com/tungvoduc/ADKBugTest |
@suomalainen9890 Can you try out your example / main project with that fix: #1902 please. Thanks! Furthermore in your example you have to move some code in the class ViewController: ASViewController {
private let _scrollNode: ASScrollNode = ASScrollNode()
private let _profileInfoNode = ProfileInfoNode()
override func viewDidLoad() {
super.viewDidLoad()
self.node.addSubnode(_profileInfoNode)
}
override func viewDidLayoutSubviews() {
super.viewDidLayoutSubviews()
let size = _profileInfoNode.measureWithSizeRange(ASSizeRange(min: CGSize(width: node.bounds.size.width, height: 0), max: CGSize(width: node.bounds.size.width, height: 100))).size
_profileInfoNode.frame = CGRect(origin: CGPointMake(0, 20), size: size)
}
init() {
super.init(node: _scrollNode)
self.edgesForExtendedLayout = UIRectEdge.Bottom
}
required init?(coder aDecoder: NSCoder) {
fatalError("init(coder:) has not been implemented")
}
} |
Just want to follow up on this issue. I just looked into that again and the initial issue is fixed as the right behavior (relayout of the nodes are bubbling up) will occur if you tap the button. That said the |
I don't know why button title still not working for me even in version 1.9.90. Title is still truncated when changing title with longer one, and title is not aligned correctly when changing title with shorter one. But it is working in sample project and the code are pretty much the same. |
I have a ASButtonNode which has static width and height. Originally the button node has a title, if later title of the button node changes to longer text, new title is truncated even though it takes not even half of the width of the button.
The text was updated successfully, but these errors were encountered: