Giter Club home page Giter Club logo

Comments (18)

lixiang1994 avatar lixiang1994 commented on August 28, 2024

UITextView支持添加自定义视图 你可以加一个UIImageView

from attributedstring.

simpleLiYu avatar simpleLiYu commented on August 28, 2024

我尝试用UITextView加一个UIImageView,但是我设置的size并没有用

from attributedstring.

lixiang1994 avatar lixiang1994 commented on August 28, 2024

发一下你的代码我看看

from attributedstring.

simpleLiYu avatar simpleLiYu commented on August 28, 2024

iShot2020-08-26下午02 01 08
iShot2020-08-26下午02 00 10
iShot2020-08-26下午01 59 55

from attributedstring.

simpleLiYu avatar simpleLiYu commented on August 28, 2024

DiamondImageView是继承UIImageView的子类

from attributedstring.

simpleLiYu avatar simpleLiYu commented on August 28, 2024

好像图片和文字放在同一行设置大小就有问题

from attributedstring.

lixiang1994 avatar lixiang1994 commented on August 28, 2024

咦, 我这边测试好像没发现什么问题
image
image

from attributedstring.

simpleLiYu avatar simpleLiYu commented on August 28, 2024

你这个不是宽高设置的40吗,图示是一个长方形的。初始化时设置的宽高没有生效吧

from attributedstring.

lixiang1994 avatar lixiang1994 commented on August 28, 2024

我不是用的custom(size:)嘛, 会以custom(size:)为主, 你也可以不设置 不设置默认为原始大小 也就是view的frame

from attributedstring.

simpleLiYu avatar simpleLiYu commented on August 28, 2024

你下面用的custom(size:)是吧,不好意思没细看。。。你尝试一下把字体设置大点,然后图片的高度比文字的高度小,就不正确了

from attributedstring.

lixiang1994 avatar lixiang1994 commented on August 28, 2024

一共三种样式类型, proposed是建议的大小 相当于当前行高 和旁边文字一样大, original是原始大小 很好理解, custom是自定义大小

from attributedstring.

simpleLiYu avatar simpleLiYu commented on August 28, 2024

当文字高度比图片高度高,这时候设置custom样式就没有效果了,那这样是不是就没办法设置文字大,后面跟的图片小些了

from attributedstring.

lixiang1994 avatar lixiang1994 commented on August 28, 2024

咦 那可能是BUG 我看看啊

from attributedstring.

simpleLiYu avatar simpleLiYu commented on August 28, 2024

image
就是这样的,文字字体设置的大之后设置图片的高度就无效了,会和文字一样高

from attributedstring.

lixiang1994 avatar lixiang1994 commented on August 28, 2024

嗯嗯 我已经复现了, 这两天应该可以解决 有点小麻烦

from attributedstring.

simpleLiYu avatar simpleLiYu commented on August 28, 2024

大佬辛苦,爱你哟❤️

from attributedstring.

lixiang1994 avatar lixiang1994 commented on August 28, 2024

@simpleLiYu 1.6.7

from attributedstring.

simpleLiYu avatar simpleLiYu commented on August 28, 2024

欧卡

from attributedstring.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.