I have an issue with the OUIColorInspectorPane. My requirement is when I select info button then show the color inspector pane directly. For that, I have added only one slice OUITextColorAttributeInspectorSlice in the makeAvailableSlicesForStackedSlicesPane delegate. Also I have called [self showDetails:_textWell] method inside the viewwillappear in the OUIColorAttributeInspectorSlice. This is working fine in the iOS 4.2, but a crash occurs in the iOS 5.0. Could you please help?
Where does it crash? What have you tried to fix it?
In at least one spot in our apps, we do something like this, but we don't use -showDetails:. Rather we manually get the detail pane and call -pushPane:inspectingObjects:animated: on the inspector directly, passing NO for the animated parameter.
This is the crash log :
Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: 'Pushing the same view controller instance more than once is not supported (<OUIColorInspectorPane: 0x4d898a0>)'
I found that viewWillAppear method in the OUIColorAttributeInspectorSlice calls two times and its pushing the same controller in iOS 5.0.
Rather we manually get the detail pane and call -pushPane:inspectingObjects:animated: on the inspector directly, passing NO for the animated parameter
Let me know where I can call -pushPane:inspectingObjects:animated: method, as we cannot call this from viewWillAppear. Where I can find the sample code?
You should be able to call it right after creating the inspector or before presenting it.