我使用的是全新的iOS functionnality翻译的故事板(http://developer.apple.com/library/ios/#referencelibrary/GettingStarted/RoadMapiOS/chapters/InternationalizeYourApp/InternationalizeYourApp/InternationalizeYourApp.html)iOS的故事板本地化字符串不上工作的UILabel子类
这种解决方案的问题,它不与我的UILabel子类的工作。
下面是代码为我的UILabel子类:
.H:
#import <UIKit/UIKit.h>
@interface LabelThinText : UILabel
- (void)awakeFromNib;
-(id)initWithFrame:(CGRect)frame;
@end
.M:
@implementation LabelThinText
- (void)awakeFromNib
{
[super awakeFromNib];
[self setFont:[UIFont fontWithName:@"Raleway-Light" size:[[self font] pointSize]]];
}
-(id)initWithFrame:(CGRect)frame
{
id result = [super initWithFrame:frame];
if (result) {
[self setFont:[UIFont fontWithName:@"Raleway-Light" size:[[self font] pointSize]]];
}
return result;
}
@end
我想我失去了一些东西,以获得从自动翻译我的Storyboard.strings文件。
任何人有想法?
谢谢!
您可以下载我的测试项目:https://github.com/arn00s/iOS_BaseLocalization只需将设备lang从EN切换到FR,即可看到不同之处。 –