mxdios / mxdios.github.io

https://blog.markmiao.com
0 stars 0 forks source link

NSTableCellView动态行高 #41

Closed MysteryRan closed 4 years ago

MysteryRan commented 4 years ago
截屏2020-07-17 上午9 54 32

设置好了上下约束, usesAutomaticRowHeights属性设置我true,还是无法实现动态行高.

MysteryRan commented 4 years ago

希望的到你的解答。

mxdios commented 4 years ago

请问你是用xib设置的吗?

发件人: noreply@github.com 代表 zouran notifications@github.com 答复: "mxdios/mxdios.github.io" reply@reply.github.com 日期: 2020年7月17日 星期五 上午10:14 收件人: "mxdios/mxdios.github.io" mxdios.github.io@noreply.github.com 抄送: Subscribed subscribed@noreply.github.com 主题: [mxdios/mxdios.github.io] NSTableCellView动态行高 (#41)

设置好了上下约束, usesAutomaticRowHeights属性设置我true,还是无法实现动态行高.

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub, or unsubscribe.

mxdios commented 4 years ago

请问是用xib设置的吗?用第二个Wrapping Label,如果使用第一个Label,是Label不能折行。

发件人: noreply@github.com 代表 zouran notifications@github.com 答复: "mxdios/mxdios.github.io" reply@reply.github.com 日期: 2020年7月17日 星期五 上午10:14 收件人: "mxdios/mxdios.github.io" mxdios.github.io@noreply.github.com 抄送: Subscribed subscribed@noreply.github.com 主题: [mxdios/mxdios.github.io] NSTableCellView动态行高 (#41)

设置好了上下约束, usesAutomaticRowHeights属性设置我true,还是无法实现动态行高.

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub, or unsubscribe.

MysteryRan commented 4 years ago

谢谢,用第二个label就可以了,感谢。

MysteryRan commented 4 years ago

xib是解决了,如果用代码的话,除了设置约束,还有设置 usesAutomaticRowHeights 属性, 其他还需要设置什么么? 我用代码Masonry布局还是无法得到动态行高。

MysteryRan commented 4 years ago

![Uploading 截屏2020-07-17 上午10.49.42.png…]() 这样初始化,谢谢你了。

MysteryRan commented 4 years ago

如果是图片内容的话,需要怎么设置呢?

mxdios commented 4 years ago

图片内容也是一样添加约束,图片是动态宽高?拿到图片宽高更新约束

发件人: noreply@github.com 代表 zouran notifications@github.com 答复: "mxdios/mxdios.github.io" reply@reply.github.com 日期: 2020年7月17日 星期五 上午10:59 收件人: "mxdios/mxdios.github.io" mxdios.github.io@noreply.github.com 抄送: Mark Miao mxdios@163.com, Comment comment@noreply.github.com 主题: Re: [mxdios/mxdios.github.io] NSTableCellView动态行高 (#41)

如果是图片内容的话,需要怎么设置呢?

— You are receiving this because you commented. Reply to this email directly, view it on GitHub, or unsubscribe.

MysteryRan commented 4 years ago

dragsend 类似这种伸缩,好像设置宽高比不起效果。

mxdios commented 4 years ago

这种需要设置图片的宽高比约束,xib里可以设置发自我的iPhone------------------ 原始邮件 ------------------发件人: zouran notifications@github.com发送时间: 2020年7月17日 11:22收件人: mxdios/mxdios.github.io mxdios.github.io@noreply.github.com抄送: Mark Miao mxdios@163.com, Comment comment@noreply.github.com主题: 回复:[mxdios/mxdios.github.io] NSTableCellView动态行高 (#41)

类似这种伸缩,好像设置宽高比不起效果。

—You are receiving this because you commented.Reply to this email directly, view it on GitHub, or unsubscribe. [ { "@context": "http://schema.org", "@type": "EmailMessage", "potentialAction": { "@type": "ViewAction", "target": "https://github.com/mxdios/mxdios.github.io/issues/41#issuecomment-659816805", "url": "https://github.com/mxdios/mxdios.github.io/issues/41#issuecomment-659816805", "name": "View Issue" }, "description": "View this Issue on GitHub", "publisher": { "@type": "Organization", "name": "GitHub", "url": "https://github.com" } } ]

MysteryRan commented 4 years ago

dragsend imageView在不设置内容图片你的情况下是正常的,设置图片后就无法实现伸缩的效果了,请问是什么情况?

mxdios commented 4 years ago

设置图片后image不能缩放,imageView还可以缩放吗?是不是imageView的content mode的原因

发件人: noreply@github.com 代表 zouran notifications@github.com 答复: "mxdios/mxdios.github.io" reply@reply.github.com 日期: 2020年7月17日 星期五 下午2:39 收件人: "mxdios/mxdios.github.io" mxdios.github.io@noreply.github.com 抄送: Mark Miao mxdios@163.com, Comment comment@noreply.github.com 主题: Re: [mxdios/mxdios.github.io] NSTableCellView动态行高 (#41)

imageView在不设置内容图片你的情况下是正常的,设置图片后就无法实现伸缩的效果了,请问是什么情况?

— You are receiving this because you commented. Reply to this email directly, view it on GitHub, or unsubscribe.

MysteryRan commented 4 years ago

我改成layer.contents后可以正常缩放,但是气泡的箭头就显示不出来了。 dragsend