私は私が言うのクラッシュを取得ビューを切り替えるについて4回目の後、ビューを切り替えています:[CALayer retain]:解放されたインスタンスにメッセージが送信されましたか?私のアプリで
*** -[CALayer retain]: message sent to deallocated instance 0x6c4ba0
私はXcodeでNSZombieEnabledていると、それはビューを切り替えたときに、それは、この行に私を指します。私は、メインビューコントローラを持っている、また、この私がビューを切り替える方法
#0 0x37dd68a0 in ___forwarding___()
#1 0x37d31680 in __forwarding_prep_0___()
#2 0x37d1d026 in CFRetain()
#3 0x37d26bb2 in +[__NSArrayI __new::]()
#4 0x37d26acc in -[__NSPlaceholderArray initWithObjects:count:]()
#5 0x3518e680 in -[UIView(Hierarchy) _makeSubtreePerformSelector:withObject:withObject:copySublayers:]()
#6 0x3518e7a4 in -[UIView(Hierarchy) _makeSubtreePerformSelector:withObject:withObject:copySublayers:]()
#7 0x3534c40c in __UIViewWillBeRemovedFromSuperview()
#8 0x3518dad0 in -[UIView(Hierarchy) removeFromSuperview]()
#9 0x000368a6 in __block_global_1 (.block_descriptor=<value temporarily unavailable, due to optimizations>, finished=1 '\001') at /Users/bobsComputer/Desktop/Projects/NewApp/MyApp/MyApp3/MyApp3ViewController.mm:135
#10 0x351a70be in -[UIViewAnimationBlockDelegate _didEndBlockAnimation:finished:context:]()
#11 0x351a181a in -[UIViewAnimationState sendDelegateAnimationDidStop:finished:]()
#12 0x351a6fb8 in -[UIViewAnimationState animationDidStop:finished:]()
#13 0x3354fba6 in CA::Layer::run_animation_callbacks()
#14 0x37a91f7a in _dispatch_main_queue_callback_4CF$VARIANT$mp()
#15 0x37da72dc in __CFRunLoopRun()
#16 0x37d2a4dc in CFRunLoopRunSpecific()
#17 0x37d2a3a4 in CFRunLoopRunInMode()
#18 0x378a8fcc in GSEventRunModal()
#19 0x351ba742 in UIApplicationMain()
:私は(GDB)のバックトレースを行う場合
[self.view removeFromSuperview];
はまた、それは私にこれを提供します。次に、ParentViewとプロトコルを使用して、他のビューコントローラからこれらのメソッドを呼び出します。次に、カスタムUIViewアニメーションを使用してビューを切り替えます。
これはクラッシュする理由は誰にもありますか?
ありがとうございます!
CALayerとは何ですか?それはUIViewですか?もしそうなら、[[view1 addSubview:view2] retain]のようにどういう意味ですか? ? –
は、しかし、何も報告しません:( –
あなたはのCALayerのデリゲートを決定するためにデバッガを使用することはできますか?デリゲートが描画するのCALayerを伝えオブジェクト(多くの場合、UIViewの)となります。私のような問題が発生していない分析しますこれは自分自身ですが、デバッガでは、 "po [(CALayer *)0x6c4ba0 delegate]"というようなことをします(これは上記の例のアドレスを使用しています)。最終的に、問題の原因を指します。 – bneely