I have no idea what I am doing wrong. I am also quite new to programming so I am not very good at debugging. This was a test app so that I can see how swift ties in with app
func buttonAction(){...
should be
func buttonAction(sender:UIButton!) { println("tapped button") }
Because of newButton's action: "buttonAction:" so.
action: "buttonAction:"