I think it'd be cleaner if we have didSets for both our undo and redo arrays where buttonState is modified instead of calling the updateButtonState function inside the addButton. Would love to see more videos
Thank you for sharing your interview experience! You will have duplicate bug with text if you add subviews in-between Redo's. You should update the label.text value for each sequential labels displayed for that colour (maybe 'for label in Int( Int(lastLabel.text) - 1) ..< undoLabels.count) in redoPressed function. I hope the interviewer didn't test it that much and you got the job, cheers!
9:57 you’re saying that the label is being removed in fact it’s being added. Looks like you copied it from undoPressed and forgot to update the comment
Genuinely very fun question, well done! Only recommendation for the future with these types of videos is make sure to make it possible for people to follow along at home (e.g. attach videos of expected behavior so people can watch at their own pace rather than relying on what you show & adding in stoppage points where people can go do the stuff on their own).
That’s a great point! I’m glad you enjoyed the video. I’ve been working on an iOS interview prep book that allows people to set their own pace. I released this video a bit earlier to accompany the content in the book. Point totally taken though, I’ll make sure to structure future videos like that 👍
If you're enjoying this video, I think you'll like my book that takes a deeper dive into examples just like this: app.gumroad.com/products/tcvck/
I think it'd be cleaner if we have didSets for both our undo and redo arrays where buttonState is modified instead of calling the updateButtonState function inside the addButton.
Would love to see more videos
This What I Thought About
why in "addSquare" function we use global var "selectedColor" instead of passing parameter "color"? very fun task to implement! thank you!
Thanks chief. Why did u put the ibaction and helper function in the extensions though? And why in separate extensions?
Thank you for sharing your interview experience! You will have duplicate bug with text if you add subviews in-between Redo's. You should update the label.text value for each sequential labels displayed for that colour (maybe 'for label in Int( Int(lastLabel.text) - 1) ..< undoLabels.count) in redoPressed function.
I hope the interviewer didn't test it that much and you got the job, cheers!
I love it. thanks for your sharing, I think this topic can very easy to know, does candidate have basic knowhow with UIKit. 👍
Why create a new stack and not use view.subviews as the stack? then remove from super view for undo and the clipboard stack will only hold the delta?
we want more videos like this!
I think it'd be best to clear the redo stacks when you add a new square, but I don't think that's a part of the task, is it?
It was nice bro, please add some more videos❣️
Nice question and solution
Thanks for sharing 👍
9:57 you’re saying that the label is being removed in fact it’s being added. Looks like you copied it from undoPressed and forgot to update the comment
Great work!! Keep it up 👍🏻
I absolutely loved it!!
Great work ! I love it.
Genuinely very fun question, well done! Only recommendation for the future with these types of videos is make sure to make it possible for people to follow along at home (e.g. attach videos of expected behavior so people can watch at their own pace rather than relying on what you show & adding in stoppage points where people can go do the stuff on their own).
That’s a great point! I’m glad you enjoyed the video. I’ve been working on an iOS interview prep book that allows people to set their own pace. I released this video a bit earlier to accompany the content in the book. Point totally taken though, I’ll make sure to structure future videos like that 👍
Keep it coming!!