Mettek
Mettek

Reputation: 409

Tab bar icon too large in Xcode 5

I have a problem with the Tab Bar. After two days I opened my Xcode and icons Tab Bar have widened.

I have tried to delete and insert a new TabBar Controller but it did not solve the problem. I have also created a new project but it has the same problem. This problem is also reflected in the simulator.

Is there a way to fix this?

Screenshot of my TabBar Controller

Upvotes: 0

Views: 5184

Answers (5)

Even Cheng
Even Cheng

Reputation: 1996

I'm running with XCode 6.4. You'll need to add those images into images.xcassets and include the @2x and @3x files accordingly based on the dimensions provided here:

iOS Human Interface Guidelines: Icon and Image Sizes

Upvotes: 1

majarmeh
majarmeh

Reputation: 75

I used to have the same issue, the solution I found is to use two icons, one of 30x30 pixel icons and another 60X60 both have the same name, the larger file with @2x

Hope that helps

Upvotes: 2

NSNinnyMuggins
NSNinnyMuggins

Reputation: 61

Try adding @2x to your image name (e.g. [email protected])

Upvotes: 5

Ephemera
Ephemera

Reputation: 8970

Those sizes look about right according to the new Human Interface Guidelines. I'm guessing the Xcode placeholder view just defaults to the maximum possible size icon (96x64 retina). If you just resize your icon images appropriately and set the itemPositioning, itemWidth and itemSpacing to the values you want, it shouldn't be a problem.

Upvotes: 1

Chris Byatt
Chris Byatt

Reputation: 3819

Try editing your icons so they are smaller?

Upvotes: 0

Related Questions