Tuesday, May 17, 2016

How To: Fix XCode 7 Lag

Hello darlings. This is not a coding tutorial but related to XCode so I post here.

XCode lag when switching between files?

I am using XCode 7.2.1 and Yosemite, and suddenly XCode lags when trying to switch between ViewControllers. I have tried many solutions suggested in internet:

Tuesday, January 12, 2016

How To: Using SLRequest to Upload Image or Video To Twitter

Hi guys what's up. This is a simple tutorial so it doesn't have any downloadable project.

Today I'd like to share with you how to upload an image (like JPEG or GIF animation) to Twitter from the iOS app.

For a normal JPEG and status upload, you can use SLComposeViewController but you will face problem if you want to upload GIF animation or video file. That is because SLComposeViewController only has "addImage" method that takes up a UIImage object.

Wednesday, November 18, 2015

How To: Pre-Process Tilemap Overlays in MKMapView

Hi all.

Time for another tutorial. Recently I was trying to modify a tilemap returned from a typical public map overlay server (such as openstreetmap.org) - basically I needed a way to change black areas of the tile into transparent so that I could nicely overlay it on top of MKMapView. I searched for this for a while, found some solutions but did not really work as I wanted. Some examples used MKTileOverlayRenderer. Somehow that gave me weird results that I do not understand.

Saturday, October 3, 2015

LONG LIVE XIBs!!!! Create an iOS app without storyboards in XCode

Are you one of those devs who don't like Storyboard? I didn't even bother to learn about Storyboards and how to use them. Call me stubborn noob that's ok. But I am so used to programmatically create things on XCode so storyboards are not my thang.

So how do you do this with latest XCode? If you go to New Project LO AND BEHOLD no such thing as a project without storyboards. All of them has storyboards. Unless you go with the absolute empty project.

Wednesday, August 12, 2015

SKSpriteKit: How to fill SKScene background with a Texture? (Code Snippet)

Yo guys.

Just submitted my latest iOS game. Check out the demo video here: FreakOut - Tribute to Breakout (iOS Game)

Anyways, I am updating one of my apps - Particle X to include the SpriteKit support. One thing that I need is to put a background texture to the SKScene background. In a normal UIView, we can simply specify self.view.backgroundColor = [UIColor colorWithPatternImage:yourUIImageHere]; and iOS will repeat that texture throughout the UIView. Which is cool.

But unfortunately there is no such method in SKScene. 

Sunday, June 7, 2015

How To: SKLabelNode Border Outline Quick Hack

Hey guys.

Today I would like to share you a simple hack on SKLabelNode. Since it is a simple snippet, there will be no project to download.

I am making my latest game (FreakOut) and was in need of SKLabelNode with outline. There are some 3rd party codes but I just want a simple and quick hack for it. So I made up this method:

Thursday, January 29, 2015

Atari Online Voice Synthesizer


This is not a tutorial. But I have something cool for you. See I am in the making of my 5th iOS Game, then in need of some 8 bit voice. Freesound.org, gives me some. But I need to have it say a certain customized words. So I went on and search for the Atari Simulator for Mac. Found some, but I can't figure out how the heck do I install the speech simulator.

Upon searching further I encountered this cool online Voice Synthesizer that sounds exactly like the one I want - Atari version! So without further delay here is:

Friday, December 5, 2014

Multiline SKLabelNode? Hell Yes Please XD

Woah. Another Noobies Tutorial yayyyyyy....

Apple, naughty Apple. You made SpriteKit and SKLabelNode, but not make multiline labelnode. This is supposed to be expected!! OMG!! UILabel has multiline function, why not SKLabelNode?

Ok, lets not get crazy. Relax I am here to solve your woes.

Thursday, June 19, 2014

How To: Create a Dynamic "More Apps..." Page & How to Customize UITableView Cells


WTF man. This short movie is super scary. I hope they make it into a longer one. It is called "Lights Out". You can watch it here:

Sunday, February 9, 2014

iOS: Designing Particles with CAEmitterLayer / CAEmitterCells

Since iOS5, iOS incorporates an easy way to create particles in your app.

This is good news, since we no longer need to delve into the complicated world of
OpenGLES or cocos2d or other engine.

However, hard coding particles can be a pain since there are quite many parameters
to play with. I wanted to incorporate this particle system into my old game - Blast The Droids,
and while playing with it, I find I am stuck in the "change one parameter, and execute" loop.
It takes hours(!) to design a simple explosion.