インターフェイスビルダーで、カスタムタブバーアイテムの画像を変更しようとしました
画像サイズは54x58です
アプリケーションは正常にコンパイルおよび実行されます。しかし、Xcode (CMD+I > Leaks) Instruments でプロファイリングすると、次のメモリ リークが表示されます。
// ... 漏洩オブジェクト番号 アドレス サイズ 責任ライブラリ 責任フレーム Malloc 48 バイト 1 0xada86a0 48 バイト CoreGraphics CGGlyphBitmapCreate Malloc 48 バイト 1 0xe1905d0 48 バイト CoreGraphics CGGlyphBitmapCreate Malloc 32 バイト 1 0xad96170 32 バイト CoreGraphics C // ....
スタック トレースには、コード リークは表示されません。この問題は、AppDelegate で NavigationBar または TabBar のカスタム背景画像を設定するだけでも発生する可能性があります。
- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions
{
// Override point for customization after application launch.
// Some Look and Feel
[[UITabBar appearance] setBackgroundImage:[UIImage imageNamed:@"nav_bg"]];
[[UINavigationBar appearance] setBackgroundImage:navbar_bkg_image
forBarMetrics:UIBarMetricsDefault];
// where navbar_bkg_image is UIImage
return YES;
}
なにか提案を ?