{"action":"opened","issue":{"url":"https://api.github.com/repos/mengxianliang/XLPageViewController/issues/2","repository_url":"https://api.github.com/repos/mengxianliang/XLPageViewController","labels_url":"https://api.github.com/repos/mengxianliang/XLPageViewController/issues/2/labels{/name}","comments_url":"https://api.github.com/repos/mengxianliang/XLPageViewController/issues/2/comments","events_url":"https://api.github.com/repos/mengxianliang/XLPageViewController/issues/2/events","html_url":"https://github.com/mengxianliang/XLPageViewController/issues/2","id":464474182,"node_id":"MDU6SXNzdWU0NjQ0NzQxODI=","number":2,"title":"在进行频繁的左右活动的时候，会出现页面混乱现象","user":{"login":"LiuQiang11","id":23353156,"node_id":"MDQ6VXNlcjIzMzUzMTU2","avatar_url":"https://avatars2.githubusercontent.com/u/23353156?v=4","gravatar_id":"","url":"https://api.github.com/users/LiuQiang11","html_url":"https://github.com/LiuQiang11","followers_url":"https://api.github.com/users/LiuQiang11/followers","following_url":"https://api.github.com/users/LiuQiang11/following{/other_user}","gists_url":"https://api.github.com/users/LiuQiang11/gists{/gist_id}","starred_url":"https://api.github.com/users/LiuQiang11/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/LiuQiang11/subscriptions","organizations_url":"https://api.github.com/users/LiuQiang11/orgs","repos_url":"https://api.github.com/users/LiuQiang11/repos","events_url":"https://api.github.com/users/LiuQiang11/events{/privacy}","received_events_url":"https://api.github.com/users/LiuQiang11/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2019-07-05T05:57:43Z","updated_at":"2019-07-05T05:57:43Z","closed_at":null,"author_association":"NONE","body":"    //获取当前vc和当前标题\r\n    UIViewController *currentVC = self.pageVC.viewControllers.firstObject;\r\n    NSString *currentTitle = currentVC.title;\r\n\r\n    NSString *targetTitle = [self titleForIndex:index];\r\n\r\n    //如果和当前位置一样，则返回当前vc\r\n    if ([currentTitle isEqualToString:targetTitle]) {\r\n        return currentVC;\r\n    }\r\n\r\n    //如果之前显示过，则从内存中读取\r\n    for (UIViewController *vc in self.shownVCArr) {\r\n        if ([vc.title isEqualToString:targetTitle]) {\r\n            return vc;\r\n        }\r\n    }\r\n\r\n\r\n上面这个段代码导致的\r\n\r\n所以我提供的解决方案是：\r\n\r\n //如果之前显示过，则从内存中读取\r\n    if (index < self.shownVCArr.count) {\r\n        UIViewController *vc = self.shownVCArr[index];\r\n        return vc;\r\n    }"}}
{"actor":{"display_login":"LiuQiang11"}}