0
我正在使用下面的方法在底部显示带有标题的工具栏。如何设置工具栏userInteractionEnabled = NO?
UIBarButtonItem *item = [[UIBarButtonItem alloc] initWithTitle:@"Your Title"
style:UIBarButtonItemStylePlain
target:nil
action:nil];
UIBarButtonItem *spacer = [[UIBarButtonItem alloc] initWithBarButtonSystemItem:UIBarButtonSystemItemFlexibleSpace
target:nil
action:nil];
NSArray *items = [[NSArray alloc] initWithObjects:spacer, item, spacer, nil];
[self.navigationController setToolbarHidden:NO animated:YES];
然而,工具栏上的标题是点击,我从它已经不知道该禁用用户交互因为工具栏是由自我navigationController创建。
你们有这个决议吗? 感谢您提前帮助。