I have an actionsheet with few buttons on it. This action sheet is repositioned after orientation changed. Below code is used during orientation changed :
[self.onlineActionsheet dismissWithClickedButtonIndex:30 animated:YES];
[self.onlineActionsheet showInView:[(UIViewController *)self.parentViewController view]];
The first LOC is used to dismiss ActionSheet while second LOC is used to present it again. This work fine for all iOS versions. However, in case of iOS 6.1.3 iPad 2 this gets crash with following log :
*** Terminating app due to uncaught exception 'UIViewControllerHierarchyInconsistency', reason: 'A view can only be associated with at most one view controller at a time! View <UIActionSheet: 0x14b333b0; frame = (0 0; 272 206); opaque = NO; animations = { opacity=
<CABasicAnimation: 0xa322d00>; }; layer = <CALayer: 0x14b2b4f0>> is associated with <_UIActionSheetHostingController: 0xa321630>. Clear this association before associating this view with <_UIActionSheetHostingController: 0xa327e20>.'
I even tried out this link : UIViewControllerHierarchyInconsistency worked in ios5 but not in ios6 but seems to dosen't work.