【问题标题】:Set Imageview With Dynamic frame使用动态框架设置 Imageview
【发布时间】:2017-10-31 15:03:37
【问题描述】:

我需要像这样设置 imageview。

谁能帮忙?
提前致谢。

【问题讨论】:

  • 请提取图片。
  • 我不知道这里有什么问题
  • 这是带有动态框架的图像。这里图像的右上角和右下角有不同的 x 和 y 坐标。
  • 没有比这更复杂的了。您不需要将 (width , height , OR aspect ratio) 提供给 ImageView 。 UIImageView 将根据图像大小自动获取宽度/高度。只需给它 x 和 y 。就是这样。
  • 你是指红色区域还是整个图像?

标签: ios iphone layout imageview


【解决方案1】:

您需要在图像上使用 UIBazierPath 并设置其框架,为此您需要为其指定 x 和 y 值,因此您应该知道确切的框架。

试试这个链接: i want to crop image using any close path like UIBezierPath. it is possible in iPhone application?

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 2012-01-28
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2023-03-31
    • 1970-01-01
    • 2017-08-20
    相关资源
    最近更新 更多