How to call method from one view to another view?

If yes, please tell me the example