how to call global function from another global function with one parameter in iphone?
<p>HiI am very new to iphone development.I am java background developer.So my approach is like java .</p>

<p>Here my requirement is that i want to call one global function from every view controller.
and from there i pass self.navigationController as a parameter. In that function i add some buton. when user click on that button it should call one more function and it should carry same object as a parameter.</p>

<p>please give me guidance. i tried as following but it is showing error at compiletime </p>

<p>Utilities.m </p>

<pre><code>     +(void)setBacKButton:(UINavigationController *)navigationController
    {

        for(UIButton *btn in navigationController.navigationBar.subviews){
            if([btn isKindOfClass:[UIButton class]]){
                [btn removeFromSuperview];
            }
        }

        UIButton *btn2=[UIButton buttonWithType:UIButtonTypeCustom];
        btn2.frame=CGRectMake(708, 0, 50, 54);
        [btn2 setImage:[UIImage imageNamed:@"btn_back.png"] forState:0];
        [btn2 setImage:[UIImage imageNamed:@"btn_back_h.png"] forState:UIControlStateSelected];
        // here i need to call bellow function when click on this button
//[btn2 addTarget:self action:@selector() forControlEvents:UIControlEventTouchUpInside];
        [navigationController.navigationBar addSubview:btn2];  
    }
    +(void)gotoBack:(UINavigationController *)navigationController
    {
        [navigationController popViewControllerAnimated:YES];
    }
</code></pre>

<p>and i call that function from my viewcontroller as</p>

<pre><code>[Utilities setBacKButton:self.navigationController];
</code></pre>

<p>please tell me how we can achieve this </p>
