the code in iOS 10 or earlier is worked
UIButton *btn1 = [UIButton buttonWithType:UIButtonTypeCustom];
[btn1 setTitle:@"yyyyy" forState:UIControlStateNormal];
[btn1 setTitleColor:[UIColor blueColor] forState:UIControlStateNormal];
[btn1 sizeToFit];
UIBarButtonItem *item1 = [[UIBarButtonItem alloc] initWithCustomView:btn1];
UIBarButtonItem *fixed = [[UIBarButtonItem alloc] initWithBarButtonSystemItem: UIBarButtonSystemItemFixedSpace target:nil action:nil];
fixed.width = -22;
self.navigationItem.rightBarButtonItems = @[fixed, item1];
if i want to do the same thing in iOS 11, what can i do fo it?