UIBarButtonItem *btn = [[UIBarButtonItem alloc]
initWithTitle:@"Set date range"
style:UIBarButtonItemStyleBordered
target:self action:@selector(setDateRangeClicked:)];
UILabel *label = [[UILabel alloc] initWithFrame:CGRectMake(5, 5, 20, 20)];
label.text = @"test";
[toolbar setItems:[NSArray btn,label, nil]];
[self.navigationController.view addSubview:toolbar];
然后。。。他就挂了。。。是因为这个Label的问题。
可是,我确实要自定义的Label加到toolbar里改怎么办