Is it possi开发者_如何学运维ble to dynamically set the size of a text field, button or other visual atributes based on the current user selected language?
Code sample would be great! Thanks for the help
You can easily adjust the size of a text field, for example depending on the text it contains.
NSString *localizedText;
textField.text = localizedText;
[textField sizeToFit];
textField.text = @"";
You can generate localizedText
dynamically with methods such as stringFromDate
etc. or keep an NSDictionary
with appropriate strings and the locales as keys.
精彩评论