Giter VIP home page Giter VIP logo

Comments (12)

shehabic avatar shehabic commented on July 21, 2024

Also notice something for iOS with LTR, everything is flipped from LTR to RTL but the actually X-Axis still measures from 0 (on the far left) to the max on (the far right),
for example of set text to align left, it'll align right, if you set constraint left: 10 pt, it'll be constraint right 10 pt.
but if you measure the position of item standing at the far left, it'll be 0, while on the right it'll be something like 300...

I'm not expert, but I thought that info might help, will also try to debug the code locally and see what's happening exactly.

And btw: your lib. is AWESOME (I will stick with it for my app, even if it have bugs or whatever :D)

from carbonkit.

shehabic avatar shehabic commented on July 21, 2024

Notice: this issue Affects iOS 9 only, in iOS 8 the library is always displayed LTR

from carbonkit.

ermalkaleci avatar ermalkaleci commented on July 21, 2024

hey @shehabic
please can you post any screenshot? I will see this issues asap

from carbonkit.

shehabic avatar shehabic commented on July 21, 2024

I will upload a video shortly and share the link here

from carbonkit.

shehabic avatar shehabic commented on July 21, 2024

@ermalkaleci here it is: https://www.youtube.com/watch?v=7YqM54Z2fDU

from carbonkit.

shehabic avatar shehabic commented on July 21, 2024

I added this small piece of code to help me understand what's happening with RTL on ios 9+ :

        bool RTL = [UIApplication sharedApplication].userInterfaceLayoutDirection == UIUserInterfaceLayoutDirectionRightToLeft;       
        NSLog(@"offsetX: %f, SegmentWidth: %f, ScrollViewWidth: %f", offset.x, segmentedWidth, scrollViewWidth);
        NSLog(@"is Right to left: %@", RTL ? @"yes" : @"no");

around here:
https://github.com/ermalkaleci/CarbonKit/blob/master/CarbonKit/CarbonTabSwipeNavigation.m#L308

The issue I found is a bit complicated, the indexes of tabs are somehow flipped on RTL, also the condition of ScrollX vs Width is flipped, but only on iOS 9, so I found that the hack I did was a bit messy and doesn't qualify enough to be a quality PR.

from carbonkit.

ermalkaleci avatar ermalkaleci commented on July 21, 2024

@shehabic so on iOS 8, it works fine?

from carbonkit.

shehabic avatar shehabic commented on July 21, 2024

Yes because the lib is displayed LTR on iOS 8
But if you use the condition above, RTL will be true, though the lib is showing LTR but the rest of the UI is RTL

from carbonkit.

ermalkaleci avatar ermalkaleci commented on July 21, 2024

I think I fixed it
carbontabswipenavigationrtl

from carbonkit.

ermalkaleci avatar ermalkaleci commented on July 21, 2024

@shehabic can you try and let me know?
add this to your Podfile

pod 'CarbonKit', :git => 'https://github.com/ermalkaleci/CarbonKit.git', :commit => 'ae5830e'
pod update CarbonKit

from carbonkit.

shehabic avatar shehabic commented on July 21, 2024

👍 works perfectly, thanks, and keep up the great work, I think this lib. definitely deserves more Stars.

from carbonkit.

ermalkaleci avatar ermalkaleci commented on July 21, 2024

@shehabic I am deploying version 2.1.1
Make sure to update podfile

from carbonkit.

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.