Tagged with nstimer

Browse all tags

Different flavors of WebSockets on Vapor with Swift

Swift on the server lately is getting more traction despite IBM leaving the club. One of the most popular frameworks out there is Vapor. It is built on top of Apple’s SwiftNIO and written fully in Swift programming language. This time we will look into how to work with WebSockets using Vapor framework. We are going to see how to create a client and server using Vapor’s module WebSocketKit and Vapor framework itself.

Read more

NSTimer vs CADisplayLink

NSTimer or just Timer in Swift world is a commonly used way to execute something repeatedly with an interval. For instance, a countdown timer is a perfect example. A hidden gem is CADisplayLink - a special flavor of timer that is linked to the device screen refresh rate. Usually, it is 60 frames per second, but in new iPads, it is 120 frames per second.

Read more