views:

68

answers:

1

hi friends...

Does anyone know how can i invoke a method on the click of the backbarButton of a viewcontroller... wat i have are two table view controllers..one list view and another detail view.... the detail view is pushed in to the navigation controller when an item is clicked in the list view. when the Back bar button is clicked i want to invoke a function...

Pls any help will be appreciated..

A: 

Refer to the UINavigationController reference. You can set the leftBarButtonItem property to a custom UIBarButtonItem that has the method that you want invoked as the action: when you create a UIBarButtonItem with the initializer that will suit your needs. There are also references to sample projects in the documentation. The NavBar project is probably a good place to start.

falconcreek