我通过UITabBar外观将SelectionIndicatorImage设置为可拉伸(stretch)图像(以适应各种设备宽度):UIImage*selectedImage=[[UIImageimageNamed:@"SelectedTab"]stretchableImageWithLeftCapWidth:0topCapHeight:0];[[UITabBarappearance]setSelectionIndicatorImage:selectedImage];因此,我在屏幕边缘得到了2pt的填充。我基本上是在尝试使用选择指示器作为当前选定的UITabBarItem的背景。htt