{"action":"opened","issue":{"url":"https://api.github.com/repos/qq3200341/FLImageShow/issues/2","repository_url":"https://api.github.com/repos/qq3200341/FLImageShow","labels_url":"https://api.github.com/repos/qq3200341/FLImageShow/issues/2/labels{/name}","comments_url":"https://api.github.com/repos/qq3200341/FLImageShow/issues/2/comments","events_url":"https://api.github.com/repos/qq3200341/FLImageShow/issues/2/events","html_url":"https://github.com/qq3200341/FLImageShow/issues/2","id":209652980,"number":2,"title":"你好，发现点击放大图后。有时图片详情头部的数量（currentIndex)/(allCount)的currentIndex会有错误","user":{"login":"ChinaJackSion","id":15258279,"avatar_url":"https://avatars.githubusercontent.com/u/15258279?v=3","gravatar_id":"","url":"https://api.github.com/users/ChinaJackSion","html_url":"https://github.com/ChinaJackSion","followers_url":"https://api.github.com/users/ChinaJackSion/followers","following_url":"https://api.github.com/users/ChinaJackSion/following{/other_user}","gists_url":"https://api.github.com/users/ChinaJackSion/gists{/gist_id}","starred_url":"https://api.github.com/users/ChinaJackSion/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ChinaJackSion/subscriptions","organizations_url":"https://api.github.com/users/ChinaJackSion/orgs","repos_url":"https://api.github.com/users/ChinaJackSion/repos","events_url":"https://api.github.com/users/ChinaJackSion/events{/privacy}","received_events_url":"https://api.github.com/users/ChinaJackSion/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2017-02-23T03:23:35Z","updated_at":"2017-02-23T03:23:35Z","closed_at":null,"body":"- (void)scrollViewDidScroll:(UIScrollView *)scrollView\r\n{\r\nCGFloat screenWidth = [UIScreen mainScreen].bounds.size.width;\r\n_currentIndex = scrollView.contentOffset.x / screenWidth + 0.5;\r\n}\r\n上面方法中的代码改为\r\n- (void)scrollViewDidScroll:(UIScrollView *)scrollView\r\n{\r\n    CGFloat pageWidth = scrollView.frame.size.width;\r\n    _currentIndex =floor((scrollView.contentOffset.x - pageWidth / 2) / pageWidth) + 1;\r\n}\r\n问题得到解决。"}}
{"actor":{"display_login":"ChinaJackSion"}}