Comments (18)
UITextView支持添加自定义视图 你可以加一个UIImageView
from attributedstring.
我尝试用UITextView加一个UIImageView,但是我设置的size并没有用
from attributedstring.
发一下你的代码我看看
from attributedstring.
from attributedstring.
DiamondImageView是继承UIImageView的子类
from attributedstring.
好像图片和文字放在同一行设置大小就有问题
from attributedstring.
from attributedstring.
你这个不是宽高设置的40吗,图示是一个长方形的。初始化时设置的宽高没有生效吧
from attributedstring.
我不是用的custom(size:)
嘛, 会以custom(size:)
为主, 你也可以不设置 不设置默认为原始大小 也就是view的frame
from attributedstring.
你下面用的custom(size:)是吧,不好意思没细看。。。你尝试一下把字体设置大点,然后图片的高度比文字的高度小,就不正确了
from attributedstring.
一共三种样式类型, proposed是建议的大小 相当于当前行高 和旁边文字一样大, original是原始大小 很好理解, custom是自定义大小
from attributedstring.
当文字高度比图片高度高,这时候设置custom样式就没有效果了,那这样是不是就没办法设置文字大,后面跟的图片小些了
from attributedstring.
咦 那可能是BUG 我看看啊
from attributedstring.
就是这样的,文字字体设置的大之后设置图片的高度就无效了,会和文字一样高
from attributedstring.
嗯嗯 我已经复现了, 这两天应该可以解决 有点小麻烦
from attributedstring.
大佬辛苦,爱你哟❤️
from attributedstring.
@simpleLiYu 1.6.7
from attributedstring.
欧卡
from attributedstring.
Related Issues (20)
- ViewAttachment 能否将view开放出来 HOT 4
- 添加Action的情况下 文字颜色始终是蓝色,怎么修改呢 HOT 2
- AttributedString.swift文件中别名的问题 HOT 1
- TextView 图片偏移显示不全 HOT 2
- XCode14打包在iOS12设备上崩溃问题 HOT 5
- 挺喜欢这个库,但是使用的时候遇到了一些问题 HOT 15
- UIButton下action点击无效 HOT 1
- 点击事件崩溃 HOT 3
- iOS16 UITextView 默认使用的TextKit2 如遇到问题 可以切换到 TextKit 1
- 如何在SwiftUI中使用? HOT 1
- 根据多个Range设置字体颜色时,只有最后一个生效 HOT 3
- Build error with Objective-C project HOT 1
- How to create from HTML? HOT 1
- UITextView 如果设置了 isSelectable = false HOT 1
- Crash at Action.swift HOT 1
- UITextView 如果设置了 isSelectable = true 就不能触发点击事件 HOT 1
- 高亮时的样式可以默认用非高亮的样式吗? HOT 4
- 是否可替换富文本内容?
- 一个建议:增加链式调用 HOT 1
- 可以支持swiftUI吗 HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from attributedstring.