I have recently finished serveral refactoring jobs that inserting a new layer called view model , and just find it delightful. There are so many ways to work with view model but I will find the most suitable way within this page.
If we want to customize the view controller’s transition animation, we have two steps: setting the animation’s delegate and returning a transition model conforming to UIViewControllerAnimatedTransitioning in the delegate method .
We usually set the delegate to self , making the same code copied again and again. What a mess! Some would like to set the delegate to AppDelegate to ensure they only need to write once, so why not go even further.
There is a requirement to show a list of images that fetched from the internet, such as the scene of product’s detail in Taobao app. Have a glance of the effect first.
The answers are Key-Value-Observing and NSNotification .
Let’s concentrate on the first one.
The Observer Pattern is a design pattern which defines an One-To-Many relation, letting multiple objects called observer observe another object called subject at the same time. When the state of the subject changes, all the observers will be notified.
To catch up on the work of our group, I am scheduled to code for a login interface of a web app. For this is my first time to write html and css, I’d like to take some notes.
Following the footstep of open source Swift and the announcement of supporting linux, developers in open source communities spare no efforts to make Swift a better language, thus Swift heat rise and meanwhile, frameworks of Swift Server were born.
Searching on Github with key word Swift Server，I list top three frameworks with most stars.
Recently, I have spent a few time to write a simple crawler with Python, so I decide to take some notes.
Sometimes, We meet this sticky ball in the apps that we use in our daily life.
First show the effect as usual.