Two possibilities come to mind:
create a new object that has only the code that you want to re-use and have your two view controllers each use an instance of that object to perform the common functions, or
create an abstract superclass that both of your view controllers inherit from and put the common code in it.