peatiscoding

well written

Author

peat

Javascript setTimeout in swift 3.0

From my previous post Javascript setTimeout in Swift 2.0 As our Swift evolved, here is the same code for swift 3.0 Code As the swift 3.0 mandate the closure to has @escaping parameter by default instead. Here is the code:… Continue Reading →

AVPlayer, select tracks programmatically

Today, one of my work required the app to remember the track selection, so that it can be resumed when the app is resumed. The easy problem are how to store the values. The tricky problem is how to set… Continue Reading →

Using Notification.Name swift 3

Notification Name management in large project sometime is a pain, here is one of the solution to manage it.

Create UIImage from UIView in Swift 2.0

Sometime creating a UIImage as a buffer for image manipulation is critical for achieving the good application performance. Or with whatever reason it deem worth: Here is a short snippet to get a UIImage from any given UIView while honoring… Continue Reading →

Create Gray Scale Transparent Image Swift 2.0

So creating Gray Scale image from UIImage is very simple. There are multiple source codes available. There are only few that works with Transparent Images, the reason being, that the gray scaled image doesn’t translate the alpha information properly. So… Continue Reading →

Flag method as deprecated in iOS

Flag the method as deprecated in Objective-C and Swift 2.

Animate Hiding UITabBar in Swift

Hiding UITabBar with Animation in swift using its extension. So iOS provided a UITabBar in UITabBarController which is awesome, but unfortunately you cannot hide it with animation out of box. So here is a snippet, just copy & paste.

JavaScript loop async calls

JavaScript loop async calls; Asynchronous calls such as AJAX is troublesome when you need to apply the call one-by-one with set of input. Here is a simple framework to make life easier.

Deliver GCM payload with JavaScript

A short snippet to deliver GCM payload with JavaScript. So in the quest to complete my app, I need to incorporate the Push Notification. The Push Notification itself is quite abundant, but luckily Google already provide an easier solution called… Continue Reading →

Long Lived Facebook Access Token

Getting a Long Lived Facebook Access Token. Normally Facebook Open Graph API needs you to issue an Access Token, and if it is user Access Token it will last for only few minutes. So here is how you can extend… Continue Reading →

© 2018 peatiscoding — Powered by WordPress

Theme by Anders NorenUp ↑