UIView *rightView = [[UIView alloc] initWithFrame:CGRectMake(0, 0, 44, 44)]; UIButton *settingButton = [UIButton buttonWithType:UIButtonTypeCustom]; settingButton.frame = CGRectMake(17, 0, 44, 44); [settingButton addTarget:self action:@selector(settingAction:) forControlEvents:UIControlEventTouchUpInside]; [settingButton setImage:[UIImage imageNamed:@"btn_setting"] forState:UIControlStateNormal]; [rightView addSubview:settingButton]; self.navigationItem.rightBarButtonItem = [[UIBarButtonItem alloc] initWithCustomView:rightView];
用户登录
还没有账号?立即注册
用户注册
投稿取消
文章分类: |
|
还能输入300字
上传中....