親愛なるプログラマーへ
以下のような customLabel クラスを作成しています。
@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;
}
しかし、私の問題は、drawTextInRect メソッドが、ペン先の読み込み時に Label に対して 1 回だけ呼び出されることです。
view が popig によって再び表示される場合、すべての customLabel オブジェクトに対してどのメソッドが実行されますか?
私を助けてください。前もって感謝します。