Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CRToast is error in horizontal screen~! please help me. #196

Open
danwey opened this issue Mar 24, 2016 · 3 comments
Open

CRToast is error in horizontal screen~! please help me. #196

danwey opened this issue Mar 24, 2016 · 3 comments

Comments

@danwey
Copy link

danwey commented Mar 24, 2016

No description provided.

@dmiedema
Copy link
Contributor

Can you provide more details and a screenshot of what is going wrong?

@danwey
Copy link
Author

danwey commented Mar 25, 2016

code in:
case CRToastAnimationTypeGravity: {
UIView *notificationView = notification.notificationView;
UIView *statusBarView = notification.statusBarView;

        [notification initiateAnimator:_notificationWindow.rootViewController.view];
        [notification.animator removeAllBehaviors];
        UIGravityBehavior *gravity = [[UIGravityBehavior alloc] initWithItems:@[notificationView, statusBarView]];
        gravity.gravityDirection = notification.inGravityDirection;
        gravity.magnitude = notification.animationGravityMagnitude;
        NSMutableArray *collisionItems = [@[notificationView] mutableCopy];
        if (notification.presentationType == CRToastPresentationTypePush) [collisionItems addObject:statusBarView];
        UICollisionBehavior *collision = [[UICollisionBehavior alloc] initWithItems:collisionItems];
        collision.collisionDelegate = self;
        [collision addBoundaryWithIdentifier:kCRToastManagerCollisionBoundryIdentifier
                                   fromPoint:notification.inCollisionPoint1
                                     toPoint:notification.inCollisionPoint2];
        UIDynamicItemBehavior *rotationLock = [[UIDynamicItemBehavior alloc] initWithItems:collisionItems];
        rotationLock.allowsRotation = NO;
        [notification.animator addBehavior:gravity]; //Thread 1:signal SIGABRT
        [notification.animator addBehavior:collision];
        [notification.animator addBehavior:rotationLock];
        self.gravityAnimationCompletionBlock = inwardAnimationsCompletionBlock;
    } break;

output:
2016-03-25 09:42:33.178 newf2o[745:279004] *** Terminating app due to uncaught exception 'NSInternalInconsistencyException', reason: 'Invalid size {568, 0} for item <CRToastView: 0x12d685600; frame = (0 0; 568 0); autoresize = W; userInteractionEnabled = NO; layer = <CALayer: 0x12d68ba90>> in Dynamics'
*** First throw call stack:
(0x18199ee38 0x181003f80 0x18199ed08 0x182324124 0x18749cc78 0x1874a234c 0x1874a2ba0 0x187499fb4 0x187499d38 0x10013f12c 0x10013e41c 0x10013d968 0x10013a614 0x10013a4f4 0x1000f1260 0x1000f16e0 0x1000fbfa8 0x10011e1d4 0x100349a7c 0x100349a3c 0x10034f4e4 0x181954dd8 0x181952c40 0x18187cd10 0x183164088 0x186b51f70 0x1000f5c24 0x18141a8b8)
libc++abi.dylib: terminating with uncaught exception of type NSException

在 2016年3月24日,下午10:57,Daniel Miedema [email protected] 写道:

Can you provide more details and a screenshot of what is going wrong?


You are receiving this because you authored the thread.
Reply to this email directly or view it on GitHub #196 (comment)

@dmiedema
Copy link
Contributor

Right, but without any more context than that such as the code generating it, it makes it really hard for us to debug what is going on. There are known issues with the gravity type (#154, #141) so without more context it'll make figuring out what is going on really difficult.

For example, are you using a custom content view? Defining the size specifically? Any specific details about your use or specific implementation you can provide will make it a ton easier for us to figure out what is going on

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants