【问题标题】:(iPhone) Picking UIImage, set an UIButton image with the image, but the image is bigger(iPhone) Picking UIImage,用图片设置一个UIButton图片,但是图片比较大
【发布时间】:2010-11-17 20:13:52
【问题描述】:

用选取器控制器选择 UIImage,用图像设置一个 UIButton 图像,但图像比按钮大,而不是仅仅适合按钮。 怎么了?

Tnx

【问题讨论】:

    标签: iphone uiimage uibutton uiimagepickercontroller


    【解决方案1】:

    将图像设置为按钮的背景图像。不仅仅是图像。它的背景图片。

    【讨论】:

      【解决方案2】:

      将 imageview 的内容模式设置为 UIViewContentModeCenter 之类的东西,或者不会导致图像缩放的类似东西。

      【讨论】:

        猜你喜欢
        • 2013-03-06
        • 2012-07-29
        • 2018-05-08
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        • 2012-11-09
        • 1970-01-01
        • 2017-10-15
        相关资源
        最近更新 更多