Disable Right to left support on IOS 9? - ios

I have a large multi language app that does not have auto layout yet. The app contains many default tableview cells. In Arabic the app stays left to right and only uses the arabic localized strings. Is there a way to turn off this new right-to-left support so that default tableviewcells and navigation controller buttons are not flipped?

I know this approach via autolayout... in autolayout you can disable right to left change by selecting particular constraint and in property inspector untick the lable which says respect language...

Related

Xcode 7 what is the view "semantic" storyboard setting?

I see that iOS9 and xCode7 introduced a new field called "semantic" into storyboard config. A google search did not reveal relevant results on top.
What is the significance of the view semantic field?
There is a new internationalization support in iOS 9, which enables flipping of the interface from left to right and vice versa depending on the current system language. You can choose Arabic language to test it. Arabic is read from right to left, so the interface is flipped.
Here you can read the Apple's guide on it.
The property "Semantic" in the storyboard is a rule which allows the iOS to know if the view should be flipped or not. There are multiple options:
Unspecified - The default value for views. The view is flipped when switching between left-to-right and right-to-left layouts.
Playback - A view representing the playback controls, such as Play, Rewind, or Fast Forward buttons or playhead scrubbers. These views are not flipped when switching between left-to-right and right-to-left layouts.
Spatial - A view representing a directional control, for example a segment control for text alignment, or a D-pad control for a game. These views are not flipped when switching between left-to-right and right-to-left layouts.
Force Left-To-Right - A view that is always displayed using a left-to-right layout.
Force Right-To-Left - A view that is always displayed using a right-to-left layout.
Source - Apple's documentation

Changing the UI on the fly - iOS

As far as i know, Auto-layout supports both RTL and LTR for the current held device language. But i need to my UI elements to support LTR according to a language selection button . Is there any possible way to reload the UI using Autolayout?
Make two arrays as properties, holding the constraints for LTR layout and RTL layout.
Depending on the selected state you remove one set from the view and add the other.
It means doing programmatic auto layout but that's not really too bad. The guide provided in the docs is an easy read.

AutoLayout constrain for a view to be right above the keyboard

Would someone be so kind telling me how would you set a constrain (using size classes) for a view to be right above the keyboard (without the predictive part) on iP6 and iP6+ like on the photo below?
May I have a sample project?
Thank you
Either add the constraints in programmatically based on the keyboard size, or make separate interface files for every screen size with a fixed constraint based on a known size for the keyboard for that screen.
Below is a link to a chat application that works from the same premise. When the keyboard is active elements are pushed up so they aren't hidden by it.
https://github.com/oseparovic/MessageComposerView
The application is in Objective C and pretty easy to transfer that section of the app, I've used this myself.

iOS App Arabic Localization Issue

I am working on an application, where I have to implement arbic as well as english locale.
I have made seperate storyboards for both languages. Problem is autolayout constraints are automatically flipping my views. Is there anyway to stop auto flipping for arabic locale?
I want to design views myself for arabic.
Thanks
Constraints by default respect language direction, but you can turn this off by selecting the constraint, and then in the Attributes Inspector, unchecking the Respect language direction in the First Item and the Second Item pop down menus.
Note that that option isn't available for all constraints.

Disable ios from changing GUI controller position by localization

I have a problem that the position of a button \ image is changed according to the language localization.
e.g. in Hebrew the alignment is right-to-left in opposite to English.
this causes the buttons \ images to be positioned on the other side of the screen, in oppose to English position.
how do I disable ios from re-positioning the buttons (according to localization)?
How many languages are there for localization in your application?
If you think that there are more problems in UI then create separate .xibs file for separate localization.
Please check the link. This will help you.
https://www.clairereynaud.net/blog/getting-your-iphone-app-ready-for-localization/
I've found a simple way for doing this:
go to the controller you want to fix it's position, and select it's constraints.
set Direction property to "Left to Right" instead of Leading to Trailing".

Resources