iOS navigation bar item image size

前端 未结 6 678
一整个雨季
一整个雨季 2020-12-01 03:20

I want to customize my NavigationBar button and using my own images.

The question is what the size should be?

I found that the button size shoul

6条回答
  •  猫巷女王i
    2020-12-01 04:15

    These are the sizes that the documentation recommends for custom icons now.

    • @2: 50 x 50
    • @3: 75 x 75

    Create two images of the above pixel sizes and then add them to a new image set in your Assets.xcassets file. (Apparently the @1 size is no longer needed.)

    Alternatively, you could use a universal vector image (pdf) (see here and here). This has been my preference recently.

    Related answer

    • iOS how to set app icon and launch images

提交回复
热议问题