不要直接加按钮
先变成UIView+视图
UIView *view = [[UIView alloc] initWithFrame:CGRectMake(0, 0, 44, 44)];
[view addSubview:headBtn];
self.navigationItem.leftBarButtonItem = [[UIBarButtonItem alloc]initWithCustomView:view];
不要直接加按钮
先变成UIView+视图
UIView *view = [[UIView alloc] initWithFrame:CGRectMake(0, 0, 44, 44)];
[view addSubview:headBtn];
self.navigationItem.leftBarButtonItem = [[UIBarButtonItem alloc]initWithCustomView:view];