{"action":"created","issue":{"url":"https://api.github.com/repos/nicklockwood/iCarousel/issues/707","repository_url":"https://api.github.com/repos/nicklockwood/iCarousel","labels_url":"https://api.github.com/repos/nicklockwood/iCarousel/issues/707/labels{/name}","comments_url":"https://api.github.com/repos/nicklockwood/iCarousel/issues/707/comments","events_url":"https://api.github.com/repos/nicklockwood/iCarousel/issues/707/events","html_url":"https://github.com/nicklockwood/iCarousel/issues/707","id":140794208,"number":707,"title":"optional value error","user":{"login":"nderamchi","id":11303090,"avatar_url":"https://avatars.githubusercontent.com/u/11303090?v=3","gravatar_id":"","url":"https://api.github.com/users/nderamchi","html_url":"https://github.com/nderamchi","followers_url":"https://api.github.com/users/nderamchi/followers","following_url":"https://api.github.com/users/nderamchi/following{/other_user}","gists_url":"https://api.github.com/users/nderamchi/gists{/gist_id}","starred_url":"https://api.github.com/users/nderamchi/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nderamchi/subscriptions","organizations_url":"https://api.github.com/users/nderamchi/orgs","repos_url":"https://api.github.com/users/nderamchi/repos","events_url":"https://api.github.com/users/nderamchi/events{/privacy}","received_events_url":"https://api.github.com/users/nderamchi/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":2,"created_at":"2016-03-14T20:51:34Z","updated_at":"2016-03-31T20:24:32Z","closed_at":null,"body":"I'm working on an OS X app where two carousels are loaded at launch. Ever since i've added the second carousel however, I keep getting a 'fatal error: unexpectedly found nil while unwrapping an Optional value' for the 'sportCarousel' segment.\r\nNot sure what is going on (i'm also rather new to developing in Swift so bare with me), is there something simple that i'm overlooking?\r\n `func numberOfItemsInCarousel(carousel: iCarousel) -> Int {\r\n        \r\n        var number:Int!\r\n        \r\n        if carousel == sportCarousel {\r\n            number = 46\r\n        }\r\n        \r\n        else if carousel == yearCarousel {\r\n            number = yearIconItems.count\r\n        }\r\n        \r\n        return number\r\n    }\r\n`\r\n\r\n"},"comment":{"url":"https://api.github.com/repos/nicklockwood/iCarousel/issues/comments/204110185","html_url":"https://github.com/nicklockwood/iCarousel/issues/707#issuecomment-204110185","issue_url":"https://api.github.com/repos/nicklockwood/iCarousel/issues/707","id":204110185,"user":{"login":"nderamchi","id":11303090,"avatar_url":"https://avatars.githubusercontent.com/u/11303090?v=3","gravatar_id":"","url":"https://api.github.com/users/nderamchi","html_url":"https://github.com/nderamchi","followers_url":"https://api.github.com/users/nderamchi/followers","following_url":"https://api.github.com/users/nderamchi/following{/other_user}","gists_url":"https://api.github.com/users/nderamchi/gists{/gist_id}","starred_url":"https://api.github.com/users/nderamchi/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nderamchi/subscriptions","organizations_url":"https://api.github.com/users/nderamchi/orgs","repos_url":"https://api.github.com/users/nderamchi/repos","events_url":"https://api.github.com/users/nderamchi/events{/privacy}","received_events_url":"https://api.github.com/users/nderamchi/received_events","type":"User","site_admin":false},"created_at":"2016-03-31T20:24:32Z","updated_at":"2016-03-31T20:24:32Z","body":"One is definitely calling before the other every time. Any suggestions as to how I could check that it's been bound/control when the numberOfItemsInCarousel is set at launch?"}}