{"action":"closed","number":323,"pull_request":{"url":"https://api.github.com/repos/nicklockwood/FXForms/pulls/323","id":30742635,"html_url":"https://github.com/nicklockwood/FXForms/pull/323","diff_url":"https://github.com/nicklockwood/FXForms/pull/323.diff","patch_url":"https://github.com/nicklockwood/FXForms/pull/323.patch","issue_url":"https://api.github.com/repos/nicklockwood/FXForms/issues/323","number":323,"state":"closed","locked":false,"title":"Fixed long UITextView's to scroll to the the cursor position instead of the bottom of the UITextView","user":{"login":"DonnaLea","id":341445,"avatar_url":"https://avatars.githubusercontent.com/u/341445?v=3","gravatar_id":"","url":"https://api.github.com/users/DonnaLea","html_url":"https://github.com/DonnaLea","followers_url":"https://api.github.com/users/DonnaLea/followers","following_url":"https://api.github.com/users/DonnaLea/following{/other_user}","gists_url":"https://api.github.com/users/DonnaLea/gists{/gist_id}","starred_url":"https://api.github.com/users/DonnaLea/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/DonnaLea/subscriptions","organizations_url":"https://api.github.com/users/DonnaLea/orgs","repos_url":"https://api.github.com/users/DonnaLea/repos","events_url":"https://api.github.com/users/DonnaLea/events{/privacy}","received_events_url":"https://api.github.com/users/DonnaLea/received_events","type":"User","site_admin":false},"body":"In a UITextView with a really long amount of text (think paragraphs) the behaviour of scrolling to the bottom of the text view when the keyboard is shown makes it very difficult to edit text that's at the top or middle of the text view, as the cursor is then off screen. This is especially a problem since when scrolling up to find the cursor the keyboard is dismissed. Please see here for a demonstration of the issue: http://youtu.be/dJRo4eZALOQ (or simply use the Basic Example project and paste a few paragraphs of Lorem Ipsum text into the About section of the registration form). \r\n\r\n---\r\n• Updated the code to do keyboard calculations and scrolling animations on UIKeyboardDidShowNotification instead of UIKeyboardWillShowNotification as the values returned for getting the cursor location weren't correct for where the user had selected in UIKeyboardWillShowNotification.\r\n• Calculating position of cursor to see if the tableview needs scrolling (if it's not covered by the keyboard then there's no need to scroll). \r\n• Makes sure the cursor is at least 3 lines above the keyboard so that there's still some context of the words surrounding the cursor. \r\n• No longer using animation values from the NSNotification since scroll animation is occurring after the keyboard is shown and therefor isn't keeping in synch","created_at":"2015-03-09T08:23:47Z","updated_at":"2015-03-09T08:28:53Z","closed_at":"2015-03-09T08:28:53Z","merged_at":"2015-03-09T08:28:53Z","merge_commit_sha":"7809d5c360fb929ceac63fd59a268903a6e1c031","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/nicklockwood/FXForms/pulls/323/commits","review_comments_url":"https://api.github.com/repos/nicklockwood/FXForms/pulls/323/comments","review_comment_url":"https://api.github.com/repos/nicklockwood/FXForms/pulls/comments{/number}","comments_url":"https://api.github.com/repos/nicklockwood/FXForms/issues/323/comments","statuses_url":"https://api.github.com/repos/nicklockwood/FXForms/statuses/73442b629d7b258c5bb70bf9ec56af9904fa3ea1","head":{"label":"DonnaLea:long-text-editing","ref":"long-text-editing","sha":"73442b629d7b258c5bb70bf9ec56af9904fa3ea1","user":{"login":"DonnaLea","id":341445,"avatar_url":"https://avatars.githubusercontent.com/u/341445?v=3","gravatar_id":"","url":"https://api.github.com/users/DonnaLea","html_url":"https://github.com/DonnaLea","followers_url":"https://api.github.com/users/DonnaLea/followers","following_url":"https://api.github.com/users/DonnaLea/following{/other_user}","gists_url":"https://api.github.com/users/DonnaLea/gists{/gist_id}","starred_url":"https://api.github.com/users/DonnaLea/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/DonnaLea/subscriptions","organizations_url":"https://api.github.com/users/DonnaLea/orgs","repos_url":"https://api.github.com/users/DonnaLea/repos","events_url":"https://api.github.com/users/DonnaLea/events{/privacy}","received_events_url":"https://api.github.com/users/DonnaLea/received_events","type":"User","site_admin":false},"repo":{"id":31882818,"name":"FXForms","full_name":"DonnaLea/FXForms","owner":{"login":"DonnaLea","id":341445,"avatar_url":"https://avatars.githubusercontent.com/u/341445?v=3","gravatar_id":"","url":"https://api.github.com/users/DonnaLea","html_url":"https://github.com/DonnaLea","followers_url":"https://api.github.com/users/DonnaLea/followers","following_url":"https://api.github.com/users/DonnaLea/following{/other_user}","gists_url":"https://api.github.com/users/DonnaLea/gists{/gist_id}","starred_url":"https://api.github.com/users/DonnaLea/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/DonnaLea/subscriptions","organizations_url":"https://api.github.com/users/DonnaLea/orgs","repos_url":"https://api.github.com/users/DonnaLea/repos","events_url":"https://api.github.com/users/DonnaLea/events{/privacy}","received_events_url":"https://api.github.com/users/DonnaLea/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/DonnaLea/FXForms","description":" FXForms is an Objective-C library for easily creating table-based forms on iOS. It is ideal for settings pages, or user data entry tasks.","fork":true,"url":"https://api.github.com/repos/DonnaLea/FXForms","forks_url":"https://api.github.com/repos/DonnaLea/FXForms/forks","keys_url":"https://api.github.com/repos/DonnaLea/FXForms/keys{/key_id}","collaborators_url":"https://api.github.com/repos/DonnaLea/FXForms/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/DonnaLea/FXForms/teams","hooks_url":"https://api.github.com/repos/DonnaLea/FXForms/hooks","issue_events_url":"https://api.github.com/repos/DonnaLea/FXForms/issues/events{/number}","events_url":"https://api.github.com/repos/DonnaLea/FXForms/events","assignees_url":"https://api.github.com/repos/DonnaLea/FXForms/assignees{/user}","branches_url":"https://api.github.com/repos/DonnaLea/FXForms/branches{/branch}","tags_url":"https://api.github.com/repos/DonnaLea/FXForms/tags","blobs_url":"https://api.github.com/repos/DonnaLea/FXForms/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/DonnaLea/FXForms/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/DonnaLea/FXForms/git/refs{/sha}","trees_url":"https://api.github.com/repos/DonnaLea/FXForms/git/trees{/sha}","statuses_url":"https://api.github.com/repos/DonnaLea/FXForms/statuses/{sha}","languages_url":"https://api.github.com/repos/DonnaLea/FXForms/languages","stargazers_url":"https://api.github.com/repos/DonnaLea/FXForms/stargazers","contributors_url":"https://api.github.com/repos/DonnaLea/FXForms/contributors","subscribers_url":"https://api.github.com/repos/DonnaLea/FXForms/subscribers","subscription_url":"https://api.github.com/repos/DonnaLea/FXForms/subscription","commits_url":"https://api.github.com/repos/DonnaLea/FXForms/commits{/sha}","git_commits_url":"https://api.github.com/repos/DonnaLea/FXForms/git/commits{/sha}","comments_url":"https://api.github.com/repos/DonnaLea/FXForms/comments{/number}","issue_comment_url":"https://api.github.com/repos/DonnaLea/FXForms/issues/comments{/number}","contents_url":"https://api.github.com/repos/DonnaLea/FXForms/contents/{+path}","compare_url":"https://api.github.com/repos/DonnaLea/FXForms/compare/{base}...{head}","merges_url":"https://api.github.com/repos/DonnaLea/FXForms/merges","archive_url":"https://api.github.com/repos/DonnaLea/FXForms/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/DonnaLea/FXForms/downloads","issues_url":"https://api.github.com/repos/DonnaLea/FXForms/issues{/number}","pulls_url":"https://api.github.com/repos/DonnaLea/FXForms/pulls{/number}","milestones_url":"https://api.github.com/repos/DonnaLea/FXForms/milestones{/number}","notifications_url":"https://api.github.com/repos/DonnaLea/FXForms/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/DonnaLea/FXForms/labels{/name}","releases_url":"https://api.github.com/repos/DonnaLea/FXForms/releases{/id}","created_at":"2015-03-09T06:32:18Z","updated_at":"2015-03-09T06:32:20Z","pushed_at":"2015-03-09T08:20:30Z","git_url":"git://github.com/DonnaLea/FXForms.git","ssh_url":"git@github.com:DonnaLea/FXForms.git","clone_url":"https://github.com/DonnaLea/FXForms.git","svn_url":"https://github.com/DonnaLea/FXForms","homepage":null,"size":2297,"stargazers_count":0,"watchers_count":0,"language":"Objective-C","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"nicklockwood:master","ref":"master","sha":"c020a8b34f8c3541b670e1b19db6e1984439e507","user":{"login":"nicklockwood","id":546885,"avatar_url":"https://avatars.githubusercontent.com/u/546885?v=3","gravatar_id":"","url":"https://api.github.com/users/nicklockwood","html_url":"https://github.com/nicklockwood","followers_url":"https://api.github.com/users/nicklockwood/followers","following_url":"https://api.github.com/users/nicklockwood/following{/other_user}","gists_url":"https://api.github.com/users/nicklockwood/gists{/gist_id}","starred_url":"https://api.github.com/users/nicklockwood/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nicklockwood/subscriptions","organizations_url":"https://api.github.com/users/nicklockwood/orgs","repos_url":"https://api.github.com/users/nicklockwood/repos","events_url":"https://api.github.com/users/nicklockwood/events{/privacy}","received_events_url":"https://api.github.com/users/nicklockwood/received_events","type":"User","site_admin":false},"repo":{"id":17406308,"name":"FXForms","full_name":"nicklockwood/FXForms","owner":{"login":"nicklockwood","id":546885,"avatar_url":"https://avatars.githubusercontent.com/u/546885?v=3","gravatar_id":"","url":"https://api.github.com/users/nicklockwood","html_url":"https://github.com/nicklockwood","followers_url":"https://api.github.com/users/nicklockwood/followers","following_url":"https://api.github.com/users/nicklockwood/following{/other_user}","gists_url":"https://api.github.com/users/nicklockwood/gists{/gist_id}","starred_url":"https://api.github.com/users/nicklockwood/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nicklockwood/subscriptions","organizations_url":"https://api.github.com/users/nicklockwood/orgs","repos_url":"https://api.github.com/users/nicklockwood/repos","events_url":"https://api.github.com/users/nicklockwood/events{/privacy}","received_events_url":"https://api.github.com/users/nicklockwood/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/nicklockwood/FXForms","description":" FXForms is an Objective-C library for easily creating table-based forms on iOS. It is ideal for settings pages, or user data entry tasks.","fork":false,"url":"https://api.github.com/repos/nicklockwood/FXForms","forks_url":"https://api.github.com/repos/nicklockwood/FXForms/forks","keys_url":"https://api.github.com/repos/nicklockwood/FXForms/keys{/key_id}","collaborators_url":"https://api.github.com/repos/nicklockwood/FXForms/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/nicklockwood/FXForms/teams","hooks_url":"https://api.github.com/repos/nicklockwood/FXForms/hooks","issue_events_url":"https://api.github.com/repos/nicklockwood/FXForms/issues/events{/number}","events_url":"https://api.github.com/repos/nicklockwood/FXForms/events","assignees_url":"https://api.github.com/repos/nicklockwood/FXForms/assignees{/user}","branches_url":"https://api.github.com/repos/nicklockwood/FXForms/branches{/branch}","tags_url":"https://api.github.com/repos/nicklockwood/FXForms/tags","blobs_url":"https://api.github.com/repos/nicklockwood/FXForms/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/nicklockwood/FXForms/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/nicklockwood/FXForms/git/refs{/sha}","trees_url":"https://api.github.com/repos/nicklockwood/FXForms/git/trees{/sha}","statuses_url":"https://api.github.com/repos/nicklockwood/FXForms/statuses/{sha}","languages_url":"https://api.github.com/repos/nicklockwood/FXForms/languages","stargazers_url":"https://api.github.com/repos/nicklockwood/FXForms/stargazers","contributors_url":"https://api.github.com/repos/nicklockwood/FXForms/contributors","subscribers_url":"https://api.github.com/repos/nicklockwood/FXForms/subscribers","subscription_url":"https://api.github.com/repos/nicklockwood/FXForms/subscription","commits_url":"https://api.github.com/repos/nicklockwood/FXForms/commits{/sha}","git_commits_url":"https://api.github.com/repos/nicklockwood/FXForms/git/commits{/sha}","comments_url":"https://api.github.com/repos/nicklockwood/FXForms/comments{/number}","issue_comment_url":"https://api.github.com/repos/nicklockwood/FXForms/issues/comments{/number}","contents_url":"https://api.github.com/repos/nicklockwood/FXForms/contents/{+path}","compare_url":"https://api.github.com/repos/nicklockwood/FXForms/compare/{base}...{head}","merges_url":"https://api.github.com/repos/nicklockwood/FXForms/merges","archive_url":"https://api.github.com/repos/nicklockwood/FXForms/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/nicklockwood/FXForms/downloads","issues_url":"https://api.github.com/repos/nicklockwood/FXForms/issues{/number}","pulls_url":"https://api.github.com/repos/nicklockwood/FXForms/pulls{/number}","milestones_url":"https://api.github.com/repos/nicklockwood/FXForms/milestones{/number}","notifications_url":"https://api.github.com/repos/nicklockwood/FXForms/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/nicklockwood/FXForms/labels{/name}","releases_url":"https://api.github.com/repos/nicklockwood/FXForms/releases{/id}","created_at":"2014-03-04T15:12:08Z","updated_at":"2015-03-08T19:25:01Z","pushed_at":"2015-03-09T08:28:53Z","git_url":"git://github.com/nicklockwood/FXForms.git","ssh_url":"git@github.com:nicklockwood/FXForms.git","clone_url":"https://github.com/nicklockwood/FXForms.git","svn_url":"https://github.com/nicklockwood/FXForms","homepage":null,"size":2297,"stargazers_count":2078,"watchers_count":2078,"language":"Objective-C","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":227,"mirror_url":null,"open_issues_count":137,"forks":227,"open_issues":137,"watchers":2078,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/nicklockwood/FXForms/pulls/323"},"html":{"href":"https://github.com/nicklockwood/FXForms/pull/323"},"issue":{"href":"https://api.github.com/repos/nicklockwood/FXForms/issues/323"},"comments":{"href":"https://api.github.com/repos/nicklockwood/FXForms/issues/323/comments"},"review_comments":{"href":"https://api.github.com/repos/nicklockwood/FXForms/pulls/323/comments"},"review_comment":{"href":"https://api.github.com/repos/nicklockwood/FXForms/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/nicklockwood/FXForms/pulls/323/commits"},"statuses":{"href":"https://api.github.com/repos/nicklockwood/FXForms/statuses/73442b629d7b258c5bb70bf9ec56af9904fa3ea1"}},"merged":true,"mergeable":null,"mergeable_state":"unknown","merged_by":{"login":"nicklockwood","id":546885,"avatar_url":"https://avatars.githubusercontent.com/u/546885?v=3","gravatar_id":"","url":"https://api.github.com/users/nicklockwood","html_url":"https://github.com/nicklockwood","followers_url":"https://api.github.com/users/nicklockwood/followers","following_url":"https://api.github.com/users/nicklockwood/following{/other_user}","gists_url":"https://api.github.com/users/nicklockwood/gists{/gist_id}","starred_url":"https://api.github.com/users/nicklockwood/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nicklockwood/subscriptions","organizations_url":"https://api.github.com/users/nicklockwood/orgs","repos_url":"https://api.github.com/users/nicklockwood/repos","events_url":"https://api.github.com/users/nicklockwood/events{/privacy}","received_events_url":"https://api.github.com/users/nicklockwood/received_events","type":"User","site_admin":false},"comments":0,"review_comments":0,"commits":1,"additions":46,"deletions":24,"changed_files":1}}