3
もしそうなら、画像をアニメーション化できますか?UILabelのテキストにはcolorWithPatternImage:が割り当てられていますか?
これをしないとよい理由はありますか?メモリ使用量など?
もしそうなら、画像をアニメーション化できますか?UILabelのテキストにはcolorWithPatternImage:が割り当てられていますか?
これをしないとよい理由はありますか?メモリ使用量など?
はい、ラベルにパターンの色を付けることができます。
alt text http://img178.imageshack.us/img178/1995/textwithpatterncolor.png
// make a UIColor with an image as the pattern
UIImage *tileImage = [UIImage imageNamed:@"hot_grad_64px.png"];
UIColor *patternColorTile = [UIColor colorWithPatternImage:tileImage];
// assign it to the .textColor property of a UILabel
self.testLabel.textColor = patternColorTile;
// the pattern will only align if both the .frame property of the
// label AND the font size is the same as the image tile height
パターンは、複数のパターンの色との間で切り替えることによってアニメーション化することができます。私は> 30fpsでパターン画像と普通の色の間を反転してしまい、iPhoneのデバイスはうまく機能し続けました。
イメージタイルが小さい限り、私はこれをしない理由は見当たりませんが、私はそれを広範囲にプロファイリングしていません。
フォントサイズが大きくなるにつれて、この塗りつぶしの色が伸びて縮尺が変わってしまい、それを修正する方法がありますか? – jjxtra
@PsychoDadはテクスチャ画像のサイズを変更するだけです。 –