I get: When I change the text of a label, that label, and all the stack change abruptly.
I expect: When I change the text of a label, that label and all the stack changes the width slowly (in my example, in 4 seconds). (If I knew what text the user put I could change the width of the elements? But I cannot know that).
On the other side, I am in macOS. I tried transform to see what happens but it says: Value of type NSTextField does not have transform. In any case, I do not know the size of the label. So, I do not think transform is the way to go?
Post
Replies
Boosts
Views
Activity
Ok. I understand. Thank you
It works very well. Thank you.
I want to learn. I have been google this and there are some things I do not understand:
Why the () at the end?
Why do you make the var private?
Thank you for reformulating my question more clearly. Your assumptions are right.
Your solution works well. I have some doubts about the var controller. I understand what you say that I must put the var to nil when I close the window. But if the close button is in another view controller, that is in another class, should I make var controller global in the first place?. But if I understand global vars are not recommended? I am not sure if I explain well my problem.
Clever solution!
As I said in my question I already have done that. I am asking how to "pause" or stop the animation not how to "remove".
When I use removeAllAnimations, view1 goes to alphaValue = 1 (in your example)
I want to click stop/pause and the animation stop at that point, at some % between 0 and 1 alphaValue. Perhaps at 0.3 or 0.5 or whatever it is when the user click to stop/pause
Thank you!
I do not know how to apply this information. I am eager to learn, but I do not know how
It works very well. Thank you!
Can you explain this line? Where can I learn more about it?:
let usableHight = NSMenu.menuBarVisible() ? totalHight - 23 : totalHight
I would like to learn more. I understand what it does, but I do not know what it is or how to reproduce in another circumstance.
Thank you. I love to learn new things!
It gives me an error I do not understand: Escaping closure capture non-escaping parameter 'completion'
Like with my code I can run but I only get result 2 when I click a second time to the button. I suppose that it means that the functions do not go one after the other.
It works perfectly. Thank you!
It works very well. Thank you.
How would it be if I call the window from an item menu?
(control drag from an item menu to the AppDelegate to create an @IBAction)
There must be something I do wrong or do not understand in point 2: I select the Window Controller > Identity Inspector > Class > I cannot change it. I write MyWindowController and when I make intro or go away, it disappears. What am I missing? (in point 1 I have created File > New > Cocoa Class > Class: MyWindowController, Subclass of NSViewController, no XIP selected)