How to adjust the bubble margin of the JSQMessagesCollectionViewCell - ios

Here, I'm using tailed and tailless bubble image for the incoming and outgoing messages. The (code for the) cell for the outgoing and incoming are pretty much alike. But, as you can see in the image, the bubble for the tailless incoming message is slightly off to the left. How can I adjust this?
I'm still learning the library but any help quick help is very much appreciated. Thanks!

try this
in fund viewdidload
self.collectionView?.collectionViewLayout.incomingAvatarViewSize = CGSizeZero
self.collectionView?.collectionViewLayout.outgoingAvatarViewSize = CGSizeZero

Hey #yoninja I think what you are looking for is adjusting the _messageBubbleLeftRightMargin I found it in the JSQMessagesCollectionViewFlowLayout line 73.
Technically the bubbles are lining up edge to edge(of the tail) So you are going to want to make something that returns a different _messageBubbleLeftRightMargin based on wether or not it is tailed or not. This should help you get where you wanna go. 🛠👻

Related

How to change text size of TextMobject in Manim

I hope you are all doing great!
I am wondering how to make text smaller in manim.
I know you can do text.scale(0.8), but I want to know how to do it after it has been used.
For example,
text.scale(0.8)
self.play(Write(text))
makeSmaller(text) <-- what I'm looking for
So far, I've tried ApplyMethod(text.scale(0.8)) with no success.
Thank you so much
Edit:
Ideally, I do not want to create two different TextMobject's and then transition between two animations.
It is:
ApplyMethod(text.scale, 0.8)
or
self.play(text.scale, 0.8)
More info here

Changing text adjustment in UIView using swift

I've been trying to create my app and something is bugging me very much,
I have images of what I am trying to achieve:
1)
2 )
number 1 shows what I am trying to do, the letters are "squeezed" together making the text appear tighter with a short width even though the letter sizing is big.
number 2 shows my attempt to achieve this, I tried multiple different ways to get that same look but failed for hours, does anyone have any suggestions or know how to make the text look like that in the first picture?
I appreciate any help, thank you!
The only way how to do it AFAIK is to use transform on UILabel, like this:
let widthTransform = 0.8 // Shrink label to 80% of its width
label.layer.transform = CATransform3DMakeScale(widthTransform, 1.0, 1.0);
Hope it helps!
Note* that transform work for about 30% of decrease (even less imo), then it just starts to look very bad. You can also change text spacing, but if you calculate it dynamically, you could end up with negative one and that looks terrible. The easiest way really is then just change of the design :)
Options:
You can decrease character spacing like in this answer
and increase font size.
Having fun with transformation on layer is really awful idea, as later you won't be able to get the height of text etc -> just everything will be working wrong.
You can also just use different font.

howto draw a text with alignment centered in simpliest way. (ios , swift)

I would like to draw a text in my custom view at point X,Y with center allignment. In case the text would be "SUGUS", I expect to have the Character G at Point X,Y.
I tried several things with NSString.drawinRect(), where I have to provide the width of the text, which has to be measured first depending on the Fonttype. It worked, but for me thats not a straightforward solution.
I purposely did not add code here, because a first try with code was misleading and I hope someone can help me with a clean simple solution ?

How to adjust the width of a font using the Uniscribe API

Please bear with me, I am new to Uniscribe so I hope this isn't a dumb question but I have been unable to find the solution anywhere else. So, here goes...
I am trying to use the Uniscribe API to reduce the width of a font; that is, given a specific font of a particular height, I would like to be able to reduce the width of each character (and all the relevant spacings) by some user-defined percentage.
I have successfully achieved this without calling any Uniscribe functions by obtaining a LOGFONT structure for the current font and adjusting the lfWidth field to be a percentage of its original value. I realise that this is just an average character width but it seemed to have the desired result.
However, when I try to do the same thing using Uniscribe I've noticed that the lfWidth field gets reset to 0 following calls to ScriptShape(). As a result, all rendered text is output using its original width. I'm at a loss to explain why this is or what to do to get around it.
Does anybody have any idea if it's even possible to do what I am trying to do?
You might want to start here (look at the Generate Glyph Information Section), then lead to this.
Hope it helps!

Vertical Text in Reporting Services (Bottom-Up)

I would like to display my text in a text box in Reporting Services vertically bottom-up. I already can have it top-down by going to the WritingMode property of the text box and switching to 'tb-rl' but there is no option for bottom-up.
I have done some research and would really like to avoid creating an image and putting that into the text box...
Any thoughts?!
Thanks!
If you're using 2008 R2, you can choose Rotate270 under "WritingMode"
I am trying to do the same thing with vertical text bottom-up. Sadly 'tb-lr' isn't accepted as a valid value. I know you said you didn't want to create an image, but that appears to be the only solution. I ended up using the following to get the desired result.
Bottom-up Vertical Text

Resources