Crash occurs when calling OUIColorInspectorpane directly #38

Closed
abiraj opened this Issue Oct 20, 2011 · 3 comments

Projects

None yet

2 participants

@abiraj
abiraj commented Oct 20, 2011

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?

@tjw
Collaborator
tjw commented Oct 20, 2011

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.

@abiraj
abiraj commented Oct 21, 2011

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?

Thanks,

@tjw
Collaborator
tjw commented Oct 21, 2011

You should be able to call it right after creating the inspector or before presenting it.

@tjw tjw closed this Jan 15, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment