Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

display is wrong in RTL #143

Closed
ahmediosDeveloper opened this issue Mar 30, 2019 · 21 comments
Closed

display is wrong in RTL #143

ahmediosDeveloper opened this issue Mar 30, 2019 · 21 comments

Comments

@ahmediosDeveloper
Copy link

every this is doing right , but when i use RTL direction it shows wrong.
this for english
Simulator Screen Shot - iPhone 8 - 2019-03-30 at 15 25 15
but same in arabic comes in this way

Simulator Screen Shot - iPhone 8 - 2019-03-30 at 15 38 58

@alghraibehMahmoud
Copy link

alghraibehMahmoud commented May 6, 2019

Hi ,
Just start skeleton in viewDidLayoutSubviews ,

override func viewDidLayoutSubviews() { view.showAnimatedGradientSkeleton() view.startSkeletonAnimation() }

@zaidqattan
Copy link

I'm having the same issue while trying to use this effect in RTL. Did you find any solutions?

@zaidqattan
Copy link

@Juanpe any solutions for this problem?

@stale
Copy link

stale bot commented Aug 27, 2019

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@stale stale bot added wontfix and removed given up labels Aug 27, 2019
@Juanpe
Copy link
Owner

Juanpe commented Aug 27, 2019

Hi @zaidqattan, please, could you provide us more info about this bug, in order to investigate how to fix it? Thanks

@zaidqattan
Copy link

Simulator Screen Shot - iPhone Xs - 2019-08-28 at 09 28 23
Simulator Screen Shot - iPhone Xs - 2019-08-28 at 09 28 26

When I tried to apply the skeleton view on arabic text in UILabel as you see it fail to cover the line with correct alignment

@zaidqattan
Copy link

zaidqattan commented Aug 28, 2019

@Juanpe waiting for your response, Thanks!

@Juanpe
Copy link
Owner

Juanpe commented Aug 28, 2019

Thanks for the info, I'm going to investigate this. Just one thing, sorry but I never did it, how you configure the UILabel to show Arabic text, only need to align the text to right?

@zaidqattan
Copy link

Screen Shot 2019-08-28 at 11 44 47 AM

Sorry it was UITextView also UILabel has same issue and I think it's a general issue in supporting RTL languages.

@zaidqattan
Copy link

zaidqattan commented Aug 28, 2019

@Juanpe I set the alignment to right as you see in the screenshot above
Thanks for your help!

@zaidqattan
Copy link

@Juanpe any news?

@Juanpe
Copy link
Owner

Juanpe commented Sep 3, 2019

Not yet, let you know when I found the problem and it's solved. Thanks

@zaidqattan
Copy link

any news about the bug fixing ? @Juanpe

@wow-such-amazing
Copy link

I don't think you have to specify alignment to the right specifically for RTL. As I understand you have to set the proper anchors and then the system will display things fine for RTL

@wow-such-amazing
Copy link

wow-such-amazing commented Oct 9, 2019

From the docs

By default, text alignment in iOS is natural; in OS X, it’s left. Using natural text alignment aligns text on the left in a left-to-right language, and automatically mirrors the alignment for right-to-left languages. For example, if you set the alignment of an NSMutableParagraphStyle object using the setAlignment: method, pass NSNaturalTextAlignment as the parameter.

However, if you want to align a control to the right in a left-to-right language (and to the left in a right-to-left language), get the layout direction, as described in Getting the Layout Direction, and set the alignment to NSLeftTextAlignment for a right-to-left language.

Source

@zaidqattan
Copy link

@crabman448 I'm still having the same issue even after specifying the alignment.

@zaidqattan
Copy link

@Juanpe any news please?

@Juanpe
Copy link
Owner

Juanpe commented Dec 30, 2019

Hi @zaidqattan, I tried to reproduce this bug, I can't :/
Actually, the skeleton layer uses the view frame and doesn't matter the text alignment. So, if you specify correctly the layout constraints, the skeleton should work fine...

Let me know if you solved this problem or if you can provide more info about your layout.

@stale
Copy link

stale bot commented Mar 3, 2020

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@stale stale bot added the given up label Mar 3, 2020
@stale stale bot closed this as completed Mar 10, 2020
@Abe-2
Copy link

Abe-2 commented Sep 16, 2020

This issue is occurring when using multiline skeletons on labels. To reproduce the issue, create a vertical stack view and place two labels inside it. let the first label have only one line of text and the other multiple lines. The alignment doesn't matter. For the stack view, set the alignment to "Leading." Change the app semantic to right-to-left. When you run the app the first label with align to the right and the second aligning to the left.

@Juanpe Juanpe reopened this Sep 16, 2020
@Juanpe
Copy link
Owner

Juanpe commented Oct 2, 2020

Hi!

Finally, SkeletonView has support for RTL, since version 1.10.0 🎉

skeleton_rtl

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

6 participants