Simply use
[self.navigationController popViewControllerAnimated:YES]
from FriendsDetailedViewController. Your view will be popped out i.e. the behavior of back button.
Note that it returns
UIViewController
on normally, and returnsnil
if there is nothing to pop.