peatiscoding

well written

Category

Geek Stuff

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 →

JavaScript setTimeout in Android Java

Last time I’ve wrote a post Javascript setTimeout in swift 2.0 here is the one to use in Android. Unlike Swift; In android version, it is not so dead simple; But we can utilize the Timer class, and its TimerTask… Continue Reading →

© 2018 peatiscoding — Powered by WordPress

Theme by Anders NorenUp ↑