Reputation: 2585
I have 2 buttons in a view and following is the screen for RTL works fine:
And in RTL it flips both and shows like this :
I am unable to stop flipping by unchecking respect language direction
I have added Constraint like this :
Its working fine on iOS 8 I want to stop them automatic flipping for iOS 9, Any guidance ?
Upvotes: 1
Views: 596
Reputation: 175
or You can use this in appDelegate,
-(BOOL) isGreaterIOSVersion:(NSString*) version
{
NSString *systemVersion = [[UIDevice currentDevice] systemVersion];
if ([systemVersion compare:version options:NSNumericSearch] != NSOrderedAscending) {
return YES;
}
return NO;
}
add below code to in didFinishLaunchingWithOptions function
if([self isGreaterIOSVersion:9.0]) {
[[UIView appearance] setSemanticContentAttribute:UISemanticContentAttributeForceLeftToRight];
}
it will remove RTL
Upvotes: 0
Reputation:
Set the semantic content attribute of the superview to Force Left-To-Right.
Upvotes: 3