This is the code for threeSim, an iOS app written in Objective-C and XCode.
Website for threeSim: http://www.disynaptic.com/threeSim.html
iTunes download: https://itunes.apple.com/us/app/threesim/id725221956?ls=1&mt=8
You can modify this code as you wish (see LICENSE) to create new circuits for simulation.