{"action":"created","issue":{"url":"https://api.github.com/repos/3lvis/DATASource/issues/68","repository_url":"https://api.github.com/repos/3lvis/DATASource","labels_url":"https://api.github.com/repos/3lvis/DATASource/issues/68/labels{/name}","comments_url":"https://api.github.com/repos/3lvis/DATASource/issues/68/comments","events_url":"https://api.github.com/repos/3lvis/DATASource/issues/68/events","html_url":"https://github.com/3lvis/DATASource/issues/68","id":153163698,"number":68,"title":"Number of sections returns one, even if theres is no objects","user":{"login":"amanbolat","id":15110242,"avatar_url":"https://avatars.githubusercontent.com/u/15110242?v=3","gravatar_id":"","url":"https://api.github.com/users/amanbolat","html_url":"https://github.com/amanbolat","followers_url":"https://api.github.com/users/amanbolat/followers","following_url":"https://api.github.com/users/amanbolat/following{/other_user}","gists_url":"https://api.github.com/users/amanbolat/gists{/gist_id}","starred_url":"https://api.github.com/users/amanbolat/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/amanbolat/subscriptions","organizations_url":"https://api.github.com/users/amanbolat/orgs","repos_url":"https://api.github.com/users/amanbolat/repos","events_url":"https://api.github.com/users/amanbolat/events{/privacy}","received_events_url":"https://api.github.com/users/amanbolat/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2016-05-05T03:55:31Z","updated_at":"2016-05-05T06:00:12Z","closed_at":"2016-05-05T04:57:38Z","body":"I want show custom message when table view is empty, but it always return 1, even if theres is no data.\r\n```\r\npublic func numberOfSectionsInTableView(tableView: UITableView) -> Int {\r\n        print(self.fetchedResultsController.sections?.count)\r\n        return self.fetchedResultsController.sections?.count ?? 0\r\n    }\r\n```\r\nBut, when i use this function without implementing DATASource, just in my own table, it returns correct count of sections:\r\n```\r\npublic func numberOfSectionsInTableView(tableView: UITableView) -> Int {\r\n        print(self.fetchedResultsController.sections?.count)\r\n        return self.fetchedResultsController.sections?.count ?? 0\r\n    }\r\n```\r\nCan't find any explanation for that."},"comment":{"url":"https://api.github.com/repos/3lvis/DATASource/issues/comments/217082029","html_url":"https://github.com/3lvis/DATASource/issues/68#issuecomment-217082029","issue_url":"https://api.github.com/repos/3lvis/DATASource/issues/68","id":217082029,"user":{"login":"amanbolat","id":15110242,"avatar_url":"https://avatars.githubusercontent.com/u/15110242?v=3","gravatar_id":"","url":"https://api.github.com/users/amanbolat","html_url":"https://github.com/amanbolat","followers_url":"https://api.github.com/users/amanbolat/followers","following_url":"https://api.github.com/users/amanbolat/following{/other_user}","gists_url":"https://api.github.com/users/amanbolat/gists{/gist_id}","starred_url":"https://api.github.com/users/amanbolat/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/amanbolat/subscriptions","organizations_url":"https://api.github.com/users/amanbolat/orgs","repos_url":"https://api.github.com/users/amanbolat/repos","events_url":"https://api.github.com/users/amanbolat/events{/privacy}","received_events_url":"https://api.github.com/users/amanbolat/received_events","type":"User","site_admin":false},"created_at":"2016-05-05T06:00:12Z","updated_at":"2016-05-05T06:00:12Z","body":"@3lvis Yes, you are right. I'm already using isEmpty variable to show or not show Empty message. However i don't understand why  `numberOfSectionsInTableView ` returns 1?"}}