UISegmentedControl, UIToolbar and UINavigationItem
问题 I've create a UISegmentedControl and successfully attached it to my navigationItem.tableView. But when I try instead to attach it to a UIToolbar, it blows up. I'm sure I've seen UISegementedControls on toolbars before - but can't seem to get it working. Thoughts? // works NSArray *statusItems = [[NSArray alloc] initWithObjects:@"one", @"two", nil]; statusSegments_ = [[UISegmentedControl alloc] initWithItems:statusItems]; self.navigationItem.titleView = statusSegments_; // doesn't work NSArray