{"action":"created","issue":{"url":"https://api.github.com/repos/jonathantribouharet/JTCalendar/issues/126","labels_url":"https://api.github.com/repos/jonathantribouharet/JTCalendar/issues/126/labels{/name}","comments_url":"https://api.github.com/repos/jonathantribouharet/JTCalendar/issues/126/comments","events_url":"https://api.github.com/repos/jonathantribouharet/JTCalendar/issues/126/events","html_url":"https://github.com/jonathantribouharet/JTCalendar/issues/126","id":69759639,"number":126,"title":"JTCalendar crashes when the view loads","user":{"login":"patricks","id":132167,"avatar_url":"https://avatars.githubusercontent.com/u/132167?v=3","gravatar_id":"","url":"https://api.github.com/users/patricks","html_url":"https://github.com/patricks","followers_url":"https://api.github.com/users/patricks/followers","following_url":"https://api.github.com/users/patricks/following{/other_user}","gists_url":"https://api.github.com/users/patricks/gists{/gist_id}","starred_url":"https://api.github.com/users/patricks/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/patricks/subscriptions","organizations_url":"https://api.github.com/users/patricks/orgs","repos_url":"https://api.github.com/users/patricks/repos","events_url":"https://api.github.com/users/patricks/events{/privacy}","received_events_url":"https://api.github.com/users/patricks/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":5,"created_at":"2015-04-21T06:51:42Z","updated_at":"2015-07-12T04:33:32Z","closed_at":null,"body":"Hi,\r\n\r\nI have used the Basic Usage section to setup the JTCalendar in my Project.\r\n\r\nBut if the view loads I get the following error:\r\n\r\n2015-04-21 08:44:35.948 Ansfelden[25569:777909] *** Terminating app due to uncaught exception 'CALayerInvalidGeometry', reason: 'CALayer position contains NaN: [nan 196.5]'\r\n*** First throw call stack:\r\n(\r\n\t0   CoreFoundation                      0x000000010e9bcc65 __exceptionPreprocess + 165\r\n\t1   libobjc.A.dylib                     0x00000001107f1bb7 objc_exception_throw + 45\r\n\t2   CoreFoundation                      0x000000010e9bcb9d +[NSException raise:format:] + 205\r\n\t3   QuartzCore                          0x0000000112da1336 _ZN2CA5Layer12set_positionERKNS_4Vec2IdEEb + 152\r\n\t4   QuartzCore                          0x0000000112da14a8 -[CALayer setPosition:] + 43\r\n\t5   QuartzCore                          0x0000000112da1b67 -[CALayer setFrame:] + 720\r\n\t6   UIKit                               0x000000010f592fdd -[UIView(Geometry) setFrame:] + 356\r\n\t7   Ansfelden                           0x000000010e382038 -[JTCalendarMenuView configureConstraintsForSubviews] + 2344\r\n\t8   Ansfelden                           0x000000010e3816db -[JTCalendarMenuView layoutSubviews] + 43\r\n\t9   UIKit                               0x000000010f5a5a2b -[UIView(CALayerDelegate) layoutSublayersOfLayer:] + 536\r\n\t10  QuartzCore                          0x0000000112da9ec2 -[CALayer layoutSublayers] + 146\r\n\t11  QuartzCore                          0x0000000112d9e6d6 _ZN2CA5Layer16layout_if_neededEPNS_11TransactionE + 380\r\n\t12  QuartzCore                          0x0000000112d9e546 _ZN2CA5Layer28layout_and_display_if_neededEPNS_11TransactionE + 24\r\n\t13  QuartzCore                          0x0000000112d0a886 _ZN2CA7Context18commit_transactionEPNS_11TransactionE + 242\r\n\t14  QuartzCore                          0x0000000112d0ba3a _ZN2CA11Transaction6commitEv + 462\r\n\t15  UIKit                               0x000000010f523a2d -[UIApplication _reportMainSceneUpdateFinished:] + 44\r\n\t16  UIKit                               0x000000010f5246f1 -[UIApplication _runWithMainScene:transitionContext:completion:] + 2648\r\n\t17  UIKit                               0x000000010f5230d5 -[UIApplication workspaceDidEndTransaction:] + 179\r\n\t18  FrontBoardServices                  0x0000000115aae5e5 __31-[FBSSerialQueue performAsync:]_block_invoke_2 + 21\r\n\t19  CoreFoundation                      0x000000010e8f041c __CFRUNLOOP_IS_CALLING_OUT_TO_A_BLOCK__ + 12\r\n\t20  CoreFoundation                      0x000000010e8e6165 __CFRunLoopDoBlocks + 341\r\n\t21  CoreFoundation                      0x000000010e8e5f25 __CFRunLoopRun + 2389\r\n\t22  CoreFoundation                      0x000000010e8e5366 CFRunLoopRunSpecific + 470\r\n\t23  UIKit                               0x000000010f522b42 -[UIApplication _run] + 413\r\n\t24  UIKit                               0x000000010f525900 UIApplicationMain + 1282\r\n\t25  Ansfelden                           0x000000010e36d777 main + 135\r\n\t26  libdyld.dylib                       0x0000000113368145 start + 1\r\n)\r\nlibc++abi.dylib: terminating with uncaught exception of type NSException\r\n\r\nAny ideas?\r\n\r\nDo I need to set some special constrains in IB?"},"comment":{"url":"https://api.github.com/repos/jonathantribouharet/JTCalendar/issues/comments/120686267","html_url":"https://github.com/jonathantribouharet/JTCalendar/issues/126#issuecomment-120686267","issue_url":"https://api.github.com/repos/jonathantribouharet/JTCalendar/issues/126","id":120686267,"user":{"login":"pcpLiu","id":3357328,"avatar_url":"https://avatars.githubusercontent.com/u/3357328?v=3","gravatar_id":"","url":"https://api.github.com/users/pcpLiu","html_url":"https://github.com/pcpLiu","followers_url":"https://api.github.com/users/pcpLiu/followers","following_url":"https://api.github.com/users/pcpLiu/following{/other_user}","gists_url":"https://api.github.com/users/pcpLiu/gists{/gist_id}","starred_url":"https://api.github.com/users/pcpLiu/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pcpLiu/subscriptions","organizations_url":"https://api.github.com/users/pcpLiu/orgs","repos_url":"https://api.github.com/users/pcpLiu/repos","events_url":"https://api.github.com/users/pcpLiu/events{/privacy}","received_events_url":"https://api.github.com/users/pcpLiu/received_events","type":"User","site_admin":false},"created_at":"2015-07-12T04:33:32Z","updated_at":"2015-07-12T04:33:32Z","body":"Hi @meganeura . I had similar problem as you. My `x` was `-inf` and `width` was  `inf`. I added code:\r\n```\r\n if (x <= 0.) { \r\n     return;\r\n }\r\n```\r\nHowever after adding these codes when I was scrolling the menu view, the content view will not change at the same time. Did you meet this problem?\r\n\r\n And I added some log print information. I found when I was dragging moving menu view,    `x`  and  `width` were always `inf`\r\n\r\nThanks"}}