I'm struggling since long time to achieve this,i.e.,
I want to create a custom tableview cell for English(LTR) and Arabic(RTL),
Please help me how to achieve this.
I'm struggling since long time to achieve this,i.e.,
I want to create a custom tableview cell for English(LTR) and Arabic(RTL),
Please help me how to achieve this.
First create 2 different tableview cell as you mentioned in the screen shots. Second, I think you are managing app localization. Take a global bool variable like flagIsEnglish, now set this flag whenever you change the language. Now when come to tableview, you are managing cell or accessing custom cell object. Here you will manage condition like this:
// cellForRowAtIndexPath
if(flagIsEnglish) {
cell = NSBundle.mainBundle().loadNibNamed("EnglishCell", owner: self, options: nil)![0] as! (CustomViewCell)
} else {
cell = NSBundle.mainBundle().loadNibNamed("ArabicCell", owner: self, options: nil)![0] as! (CustomViewCell)
}
This flag is play important role as you will get you expected output when you will implement this.