Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我的 Xcode 项目中有一个图像,它当前设置为与标签栏相同的尺寸。我通过情节提要设置了导航栏,而不是以编程方式。我希望导航栏的外观来自我的图像。我怎么做?
这是代码:
UIImage *image = [UIImage imageNamed:@"yourImage.png"]; [navigationBar setBackgroundImage:image forBarMetrics:UIBarMetricsDefault];