UIButton *RightBtn=[UIButton buttonWithType:UIButtonTypeRoundedRect];

    [RightBtn setImage:[UIImage imageNamed:@"indexLeftNav"] forState:UIControlStateNormal];

    [RightBtn setImage:[UIImage imageNamed:@"indexLeftNav"] forState:UIControlStateHighlighted];

    [RightBtn setTitle:@"退出登录" forState:UIControlStateNormal];

    RightBtn.frame=CGRectMake(0.0f, 0.0f, 60.0f, 34.0f);

    [RightBtn addTarget:self action:@selector(LoginTouchAction:) forControlEvents:UIControlEventTouchUpInside];

    UIBarButtonItem *rightItem=[[UIBarButtonItem alloc]initWithCustomView:RightBtn];

    self.navigationItem.rightBarButtonItem=rightItem;