How to make custom buttons in iOS?

后端 未结 7 1503
野的像风
野的像风 2021-02-06 09:01

The default iOS UI is nice but if I wanted to use images for buttons instead how would I do that - is it OpenGL?

7条回答
  •  余生分开走
    2021-02-06 10:02

    You can simply use PNG files that you create yourself. The UIButton class allows you to use custom images for all the different states of the application.

    You don't really need to do custom rendering yourself, but if you really want, you can use UIKit to draw the images yourself in code (no OpenGL involved): http://developer.apple.com/library/ios/#documentation/2ddrawing/conceptual/drawingprintingios/graphicsdrawingoverview/graphicsdrawingoverview.html

提交回复
热议问题