设置返回按钮backbutton

    backbtnlike=[[UIButton alloc]init];

    [backbtnlike setImage:[UIImage imageNamed:@"fanhuianniu.png"] forState:UIControlStateNormal];

    backbtnlike.frame=CGRectMake(0,10, 44,29);

    [backbtnlike addTarget:self action:@selector(back2) forControlEvents:UIControlEventTouchUpInside];


-(void)back2

{

    [backbtnlike removeFromSuperview];

    [foodinfoviewcontroller.view removeFromSuperview];

    [self.navigationController.view addSubview:storeblack];

    [backbtnlike release];

}

你可能感兴趣的:(设置返回按钮backbutton)