segment.tintColor = [UIColor clearColor];//去掉颜色,现在整个segment都看不见NSDictionary* selectedTextAttributes = @{NSFontAttributeName:[UIFont boldSystemFontOfSize:16],NSForegroundColorAttributeName: [UIColor whiteColor]};[segment setTitleTextAttributes:selectedTextAttributes forState:UIControlStateSelected];//设置文字属性NSDictionary* unselectedTextAttributes = @{NSFontAttributeName:[UIFont boldSystemFontOfSize:16],NSForegroundColorAttributeName: [UIColor lightTextColor]};[segment setTitleTextAttributes:unselectedTextAttributes forState:UIControlStateNormal];