0

me app is working fine in all of the simulators ((from iPhone 5 to iPad Pro ))

and it works fine on my iPhone 6+ but when I tried it on my iPhone 6 the ui gets messed up even though it works fine on the simulated iPhone 6

this is how it looks on the simulated iPhone 6

this is how the app looks like on the real iPhone 6

how can I fix if this a did my research and nobody is talking about this issue

rmaddy
  • 314,917
  • 42
  • 532
  • 579
  • 2
    Well, you could begin by telling us **how** you laid things out. (Code? IB?) What constraints you are using - and maybe try to be as specific as possible. With what little you've given us, how can **we** fix this? –  Jul 14 '17 at 19:29
  • I agree with @dfd, we need to see the constraints you used to lay out your views in order to help you. – Mo Abdul-Hameed Jul 14 '17 at 19:32
  • We need to see your constraints. Also as a general rule you should never test solely using the simulator. From apple on the differences: https://developer.apple.com/library/content/documentation/IDEs/Conceptual/iOS_Simulator_Guide/TestingontheiOSSimulator/TestingontheiOSSimulator.html – Christopher Larsen Jul 14 '17 at 20:39
  • @dfd please read my answer I found out what is causing this issue I don't know how to solve it – Saudi nerdZ Jul 15 '17 at 15:10
  • I'm glad you found the true issue. My first bit of advice - either do a drastic edit of *this* question or ask another question and delete this one. First, check the answer by @keno (the links) and if it helps, I'd edit this question and give a proper answer. (It will help others facing the same issue.) I'm not fully convinced that solving your problem isn't a matter of altering the constraints somehow - but I do understand the Arabic runs right-to-left and could definitely be an issue. Good luck. –  Jul 15 '17 at 21:42

2 Answers2

0

I found the problem but I don't know how to solve it

The constraints weren't the problem nor is the IB outlets

The problem is because of the different languages

The simulator and my iPhone 6+ settings language was English

My iPhone 6 sitting language was arabic

You see in English you start from left to right But in Arabic we start from right to left

If you change the language of your ios device from English to Arabic You will notice that everything is in the opposite side that it was on

You will notice it in Home page and even in apps

These are photos of different applications in Device language settings (( arabic - English ))

in English

. in arabic

.

I wanted to add more photos of different apps in different languages but stock overflow says that I need at least 10 reputation to post more than 2 two links

((this is my first stackoverflow question/answer))

0

It would seem from the screenshots that your problem is with the view semantics. If you did not change default value 'unspecified' than those views would flip when you change languages that use left-to-right and right-to-left layout.

For more information check Apple docs or this SO question.

keno
  • 31
  • 2