I have GPU renderer view need to be initialized based on the frame of a subview. But I always get frame=zero no matter where I put the code.
I can't put it in viewDidLayoutSubviews
, because it will be called multiple times, I don't know which one is the correct one.
viewDidAppear
also not the correct answer.
And I found that first viewDidLayoutSubviews
will be called after viewDidAppear
. viewDidAppear
should be called when its subviews are correctly layout?