Dear programmers,
I am creating a customLabel class like below:
@interface CustomLabel : UILabel {
NSString *customBundlePath;
}
@implementation CustomLabel
- (void)drawTextInRect:(CGRect)rect
{
NSString *result=[self getLocalvalue:self.text];
[result drawInRect:rect withFont:self.font];
}
-(void)awakeFromNib
{
NSLog(@"%@",self.text);
}
-(NSString *)getLocalvalue:(NSString*)textTolocalize
{
// some code
return localizedText;
}
But my problem is, drawTextInRect method calling only once for a Label at the time of nib loading.
If view is Appearing again by popig, then which method will execute for every customLabel object ?
Please help me out. Thanks, in advance.
You don't need custom classes.
Then you can extract the strings from your files and provide proper localization texts.
A couple of useful links:
http://www.icanlocalize.com/site/tutorials/iphone-applications-localization-guide/
http://www.raywenderlich.com/2876/how-to-localize-an-iphone-app-tutorial