{"action":"created","comment":{"url":"https://api.github.com/repos/nporpigliaglobant/Kanban/pulls/comments/32031629","id":32031629,"diff_hunk":"@@ -0,0 +1,106 @@\n+//\n+//  KBNTutorialPageViewController.m\n+//  Kanban\n+//\n+//  Created by Maxi Casal on 6/4/15.\n+//  Copyright (c) 2015 Globant. All rights reserved.\n+//\n+\n+#import \"KBNTutorialPageViewController.h\"\n+#import \"KBNTutorialContentViewController.h\"\n+\n+@interface KBNTutorialPageViewController () <UIPageViewControllerDataSource>\n+\n+@property (strong, nonatomic) UIPageViewController *pageViewController;\n+@property (strong, nonatomic) NSArray *pageActions;\n+@property (strong, nonatomic) NSArray *pageImages;\n+\n+@end\n+\n+@implementation KBNTutorialPageViewController\n+\n+- (void)viewDidLoad {\n+    [super viewDidLoad];\n+    [self setupTutorialData];\n+    \n+    // Create page view controller\n+    self.pageViewController = [self.storyboard instantiateViewControllerWithIdentifier:@\"PageViewController\"];\n+    self.pageViewController.dataSource = self;\n+    \n+    KBNTutorialContentViewController *startingViewController = [self viewControllerAtIndex:0];\n+    NSArray *viewControllers = @[startingViewController];\n+    [self.pageViewController setViewControllers:viewControllers direction:UIPageViewControllerNavigationDirectionForward animated:NO completion:nil];\n+    \n+    // Change the size of page view controller\n+    self.pageViewController.view.frame = self.view.frame;\n+\n+    [self addChildViewController:self.pageViewController];\n+    [self.view addSubview:self.pageViewController.view];\n+    [self.pageViewController didMoveToParentViewController:self];\n+}\n+\n+- (void)setupTutorialData {\n+    self.pageActions = @[@\"Create Projects\", @\"Create and move tasks\", @\"Invite users\"];\n+    self.pageImages = @[@\"tutorial1.png\", @\"tutorial2.png\", @\"tutorial3.png\"];\n+}\n+\n+- (void)didReceiveMemoryWarning {\n+    [super didReceiveMemoryWarning];\n+    // Dispose of any resources that can be recreated.\n+}\n+\n+#pragma mark - Page View Controller Data Source\n+\n+- (UIViewController *)pageViewController:(UIPageViewController *)pageViewController viewControllerBeforeViewController:(UIViewController *)viewController\n+{\n+    NSUInteger index = ((KBNTutorialContentViewController*) viewController).pageIndex;\n+    \n+    if ((index == 0) || (index == NSNotFound)) {\n+        return nil;\n+    }\n+    \n+    index--;\n+    return [self viewControllerAtIndex:index];\n+}\n+\n+- (UIViewController *)pageViewController:(UIPageViewController *)pageViewController viewControllerAfterViewController:(UIViewController *)viewController\n+{\n+    NSUInteger index = ((KBNTutorialContentViewController*) viewController).pageIndex;\n+    \n+    if (index == NSNotFound) {\n+        return nil;\n+    }\n+    \n+    index++;\n+    if (index == [self.pageActions count]) {\n+        return nil;\n+    }\n+    return [self viewControllerAtIndex:index];\n+}\n+\n+- (KBNTutorialContentViewController *)viewControllerAtIndex:(NSUInteger)index\n+{\n+    if (([self.pageActions count] == 0) || (index >= [self.pageActions count])) {\n+        return nil;\n+    }\n+    \n+    // Create a new view controller and pass suitable data.\n+    KBNTutorialContentViewController *pageContentViewController = [self.storyboard instantiateViewControllerWithIdentifier:@\"KBNTutorialContentViewController\"];","path":"Kanban/Controllers/KBNTutorialPageViewController.m","position":88,"original_position":88,"commit_id":"2bee7876fba804e6561f04bfa0668488e8d9063a","original_commit_id":"2bee7876fba804e6561f04bfa0668488e8d9063a","user":{"login":"marcelodessal","id":9701698,"avatar_url":"https://avatars.githubusercontent.com/u/9701698?v=3","gravatar_id":"","url":"https://api.github.com/users/marcelodessal","html_url":"https://github.com/marcelodessal","followers_url":"https://api.github.com/users/marcelodessal/followers","following_url":"https://api.github.com/users/marcelodessal/following{/other_user}","gists_url":"https://api.github.com/users/marcelodessal/gists{/gist_id}","starred_url":"https://api.github.com/users/marcelodessal/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/marcelodessal/subscriptions","organizations_url":"https://api.github.com/users/marcelodessal/orgs","repos_url":"https://api.github.com/users/marcelodessal/repos","events_url":"https://api.github.com/users/marcelodessal/events{/privacy}","received_events_url":"https://api.github.com/users/marcelodessal/received_events","type":"User","site_admin":false},"body":"Put view controller name as a constant.","created_at":"2015-06-09T16:15:12Z","updated_at":"2015-06-09T16:15:12Z","html_url":"https://github.com/nporpigliaglobant/Kanban/pull/49#discussion_r32031629","pull_request_url":"https://api.github.com/repos/nporpigliaglobant/Kanban/pulls/49","_links":{"self":{"href":"https://api.github.com/repos/nporpigliaglobant/Kanban/pulls/comments/32031629"},"html":{"href":"https://github.com/nporpigliaglobant/Kanban/pull/49#discussion_r32031629"},"pull_request":{"href":"https://api.github.com/repos/nporpigliaglobant/Kanban/pulls/49"}}},"pull_request":{"url":"https://api.github.com/repos/nporpigliaglobant/Kanban/pulls/49","id":36966011,"html_url":"https://github.com/nporpigliaglobant/Kanban/pull/49","diff_url":"https://github.com/nporpigliaglobant/Kanban/pull/49.diff","patch_url":"https://github.com/nporpigliaglobant/Kanban/pull/49.patch","issue_url":"https://api.github.com/repos/nporpigliaglobant/Kanban/issues/49","number":49,"state":"open","locked":false,"title":"Adding the tutorial","user":{"login":"maxicasal","id":8933036,"avatar_url":"https://avatars.githubusercontent.com/u/8933036?v=3","gravatar_id":"","url":"https://api.github.com/users/maxicasal","html_url":"https://github.com/maxicasal","followers_url":"https://api.github.com/users/maxicasal/followers","following_url":"https://api.github.com/users/maxicasal/following{/other_user}","gists_url":"https://api.github.com/users/maxicasal/gists{/gist_id}","starred_url":"https://api.github.com/users/maxicasal/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/maxicasal/subscriptions","organizations_url":"https://api.github.com/users/maxicasal/orgs","repos_url":"https://api.github.com/users/maxicasal/repos","events_url":"https://api.github.com/users/maxicasal/events{/privacy}","received_events_url":"https://api.github.com/users/maxicasal/received_events","type":"User","site_admin":false},"body":"","created_at":"2015-06-04T18:52:54Z","updated_at":"2015-06-09T16:15:12Z","closed_at":null,"merged_at":null,"merge_commit_sha":"1963b4249e9ee49a85b022c54518e181870f0bf2","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/nporpigliaglobant/Kanban/pulls/49/commits","review_comments_url":"https://api.github.com/repos/nporpigliaglobant/Kanban/pulls/49/comments","review_comment_url":"https://api.github.com/repos/nporpigliaglobant/Kanban/pulls/comments{/number}","comments_url":"https://api.github.com/repos/nporpigliaglobant/Kanban/issues/49/comments","statuses_url":"https://api.github.com/repos/nporpigliaglobant/Kanban/statuses/2bee7876fba804e6561f04bfa0668488e8d9063a","head":{"label":"nporpigliaglobant:feature/tutorial","ref":"feature/tutorial","sha":"2bee7876fba804e6561f04bfa0668488e8d9063a","user":{"login":"nporpigliaglobant","id":11842154,"avatar_url":"https://avatars.githubusercontent.com/u/11842154?v=3","gravatar_id":"","url":"https://api.github.com/users/nporpigliaglobant","html_url":"https://github.com/nporpigliaglobant","followers_url":"https://api.github.com/users/nporpigliaglobant/followers","following_url":"https://api.github.com/users/nporpigliaglobant/following{/other_user}","gists_url":"https://api.github.com/users/nporpigliaglobant/gists{/gist_id}","starred_url":"https://api.github.com/users/nporpigliaglobant/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nporpigliaglobant/subscriptions","organizations_url":"https://api.github.com/users/nporpigliaglobant/orgs","repos_url":"https://api.github.com/users/nporpigliaglobant/repos","events_url":"https://api.github.com/users/nporpigliaglobant/events{/privacy}","received_events_url":"https://api.github.com/users/nporpigliaglobant/received_events","type":"User","site_admin":false},"repo":{"id":33998750,"name":"Kanban","full_name":"nporpigliaglobant/Kanban","owner":{"login":"nporpigliaglobant","id":11842154,"avatar_url":"https://avatars.githubusercontent.com/u/11842154?v=3","gravatar_id":"","url":"https://api.github.com/users/nporpigliaglobant","html_url":"https://github.com/nporpigliaglobant","followers_url":"https://api.github.com/users/nporpigliaglobant/followers","following_url":"https://api.github.com/users/nporpigliaglobant/following{/other_user}","gists_url":"https://api.github.com/users/nporpigliaglobant/gists{/gist_id}","starred_url":"https://api.github.com/users/nporpigliaglobant/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nporpigliaglobant/subscriptions","organizations_url":"https://api.github.com/users/nporpigliaglobant/orgs","repos_url":"https://api.github.com/users/nporpigliaglobant/repos","events_url":"https://api.github.com/users/nporpigliaglobant/events{/privacy}","received_events_url":"https://api.github.com/users/nporpigliaglobant/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/nporpigliaglobant/Kanban","description":"","fork":false,"url":"https://api.github.com/repos/nporpigliaglobant/Kanban","forks_url":"https://api.github.com/repos/nporpigliaglobant/Kanban/forks","keys_url":"https://api.github.com/repos/nporpigliaglobant/Kanban/keys{/key_id}","collaborators_url":"https://api.github.com/repos/nporpigliaglobant/Kanban/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/nporpigliaglobant/Kanban/teams","hooks_url":"https://api.github.com/repos/nporpigliaglobant/Kanban/hooks","issue_events_url":"https://api.github.com/repos/nporpigliaglobant/Kanban/issues/events{/number}","events_url":"https://api.github.com/repos/nporpigliaglobant/Kanban/events","assignees_url":"https://api.github.com/repos/nporpigliaglobant/Kanban/assignees{/user}","branches_url":"https://api.github.com/repos/nporpigliaglobant/Kanban/branches{/branch}","tags_url":"https://api.github.com/repos/nporpigliaglobant/Kanban/tags","blobs_url":"https://api.github.com/repos/nporpigliaglobant/Kanban/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/nporpigliaglobant/Kanban/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/nporpigliaglobant/Kanban/git/refs{/sha}","trees_url":"https://api.github.com/repos/nporpigliaglobant/Kanban/git/trees{/sha}","statuses_url":"https://api.github.com/repos/nporpigliaglobant/Kanban/statuses/{sha}","languages_url":"https://api.github.com/repos/nporpigliaglobant/Kanban/languages","stargazers_url":"https://api.github.com/repos/nporpigliaglobant/Kanban/stargazers","contributors_url":"https://api.github.com/repos/nporpigliaglobant/Kanban/contributors","subscribers_url":"https://api.github.com/repos/nporpigliaglobant/Kanban/subscribers","subscription_url":"https://api.github.com/repos/nporpigliaglobant/Kanban/subscription","commits_url":"https://api.github.com/repos/nporpigliaglobant/Kanban/commits{/sha}","git_commits_url":"https://api.github.com/repos/nporpigliaglobant/Kanban/git/commits{/sha}","comments_url":"https://api.github.com/repos/nporpigliaglobant/Kanban/comments{/number}","issue_comment_url":"https://api.github.com/repos/nporpigliaglobant/Kanban/issues/comments{/number}","contents_url":"https://api.github.com/repos/nporpigliaglobant/Kanban/contents/{+path}","compare_url":"https://api.github.com/repos/nporpigliaglobant/Kanban/compare/{base}...{head}","merges_url":"https://api.github.com/repos/nporpigliaglobant/Kanban/merges","archive_url":"https://api.github.com/repos/nporpigliaglobant/Kanban/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/nporpigliaglobant/Kanban/downloads","issues_url":"https://api.github.com/repos/nporpigliaglobant/Kanban/issues{/number}","pulls_url":"https://api.github.com/repos/nporpigliaglobant/Kanban/pulls{/number}","milestones_url":"https://api.github.com/repos/nporpigliaglobant/Kanban/milestones{/number}","notifications_url":"https://api.github.com/repos/nporpigliaglobant/Kanban/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/nporpigliaglobant/Kanban/labels{/name}","releases_url":"https://api.github.com/repos/nporpigliaglobant/Kanban/releases{/id}","created_at":"2015-04-15T14:28:49Z","updated_at":"2015-05-07T19:36:14Z","pushed_at":"2015-06-09T12:43:30Z","git_url":"git://github.com/nporpigliaglobant/Kanban.git","ssh_url":"git@github.com:nporpigliaglobant/Kanban.git","clone_url":"https://github.com/nporpigliaglobant/Kanban.git","svn_url":"https://github.com/nporpigliaglobant/Kanban","homepage":null,"size":28092,"stargazers_count":1,"watchers_count":1,"language":"Objective-C","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":2,"forks":0,"open_issues":2,"watchers":1,"default_branch":"master"}},"base":{"label":"nporpigliaglobant:master","ref":"master","sha":"3d4d9aa18760c1a7bb065780391ae94eeb297b11","user":{"login":"nporpigliaglobant","id":11842154,"avatar_url":"https://avatars.githubusercontent.com/u/11842154?v=3","gravatar_id":"","url":"https://api.github.com/users/nporpigliaglobant","html_url":"https://github.com/nporpigliaglobant","followers_url":"https://api.github.com/users/nporpigliaglobant/followers","following_url":"https://api.github.com/users/nporpigliaglobant/following{/other_user}","gists_url":"https://api.github.com/users/nporpigliaglobant/gists{/gist_id}","starred_url":"https://api.github.com/users/nporpigliaglobant/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nporpigliaglobant/subscriptions","organizations_url":"https://api.github.com/users/nporpigliaglobant/orgs","repos_url":"https://api.github.com/users/nporpigliaglobant/repos","events_url":"https://api.github.com/users/nporpigliaglobant/events{/privacy}","received_events_url":"https://api.github.com/users/nporpigliaglobant/received_events","type":"User","site_admin":false},"repo":{"id":33998750,"name":"Kanban","full_name":"nporpigliaglobant/Kanban","owner":{"login":"nporpigliaglobant","id":11842154,"avatar_url":"https://avatars.githubusercontent.com/u/11842154?v=3","gravatar_id":"","url":"https://api.github.com/users/nporpigliaglobant","html_url":"https://github.com/nporpigliaglobant","followers_url":"https://api.github.com/users/nporpigliaglobant/followers","following_url":"https://api.github.com/users/nporpigliaglobant/following{/other_user}","gists_url":"https://api.github.com/users/nporpigliaglobant/gists{/gist_id}","starred_url":"https://api.github.com/users/nporpigliaglobant/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nporpigliaglobant/subscriptions","organizations_url":"https://api.github.com/users/nporpigliaglobant/orgs","repos_url":"https://api.github.com/users/nporpigliaglobant/repos","events_url":"https://api.github.com/users/nporpigliaglobant/events{/privacy}","received_events_url":"https://api.github.com/users/nporpigliaglobant/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/nporpigliaglobant/Kanban","description":"","fork":false,"url":"https://api.github.com/repos/nporpigliaglobant/Kanban","forks_url":"https://api.github.com/repos/nporpigliaglobant/Kanban/forks","keys_url":"https://api.github.com/repos/nporpigliaglobant/Kanban/keys{/key_id}","collaborators_url":"https://api.github.com/repos/nporpigliaglobant/Kanban/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/nporpigliaglobant/Kanban/teams","hooks_url":"https://api.github.com/repos/nporpigliaglobant/Kanban/hooks","issue_events_url":"https://api.github.com/repos/nporpigliaglobant/Kanban/issues/events{/number}","events_url":"https://api.github.com/repos/nporpigliaglobant/Kanban/events","assignees_url":"https://api.github.com/repos/nporpigliaglobant/Kanban/assignees{/user}","branches_url":"https://api.github.com/repos/nporpigliaglobant/Kanban/branches{/branch}","tags_url":"https://api.github.com/repos/nporpigliaglobant/Kanban/tags","blobs_url":"https://api.github.com/repos/nporpigliaglobant/Kanban/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/nporpigliaglobant/Kanban/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/nporpigliaglobant/Kanban/git/refs{/sha}","trees_url":"https://api.github.com/repos/nporpigliaglobant/Kanban/git/trees{/sha}","statuses_url":"https://api.github.com/repos/nporpigliaglobant/Kanban/statuses/{sha}","languages_url":"https://api.github.com/repos/nporpigliaglobant/Kanban/languages","stargazers_url":"https://api.github.com/repos/nporpigliaglobant/Kanban/stargazers","contributors_url":"https://api.github.com/repos/nporpigliaglobant/Kanban/contributors","subscribers_url":"https://api.github.com/repos/nporpigliaglobant/Kanban/subscribers","subscription_url":"https://api.github.com/repos/nporpigliaglobant/Kanban/subscription","commits_url":"https://api.github.com/repos/nporpigliaglobant/Kanban/commits{/sha}","git_commits_url":"https://api.github.com/repos/nporpigliaglobant/Kanban/git/commits{/sha}","comments_url":"https://api.github.com/repos/nporpigliaglobant/Kanban/comments{/number}","issue_comment_url":"https://api.github.com/repos/nporpigliaglobant/Kanban/issues/comments{/number}","contents_url":"https://api.github.com/repos/nporpigliaglobant/Kanban/contents/{+path}","compare_url":"https://api.github.com/repos/nporpigliaglobant/Kanban/compare/{base}...{head}","merges_url":"https://api.github.com/repos/nporpigliaglobant/Kanban/merges","archive_url":"https://api.github.com/repos/nporpigliaglobant/Kanban/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/nporpigliaglobant/Kanban/downloads","issues_url":"https://api.github.com/repos/nporpigliaglobant/Kanban/issues{/number}","pulls_url":"https://api.github.com/repos/nporpigliaglobant/Kanban/pulls{/number}","milestones_url":"https://api.github.com/repos/nporpigliaglobant/Kanban/milestones{/number}","notifications_url":"https://api.github.com/repos/nporpigliaglobant/Kanban/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/nporpigliaglobant/Kanban/labels{/name}","releases_url":"https://api.github.com/repos/nporpigliaglobant/Kanban/releases{/id}","created_at":"2015-04-15T14:28:49Z","updated_at":"2015-05-07T19:36:14Z","pushed_at":"2015-06-09T12:43:30Z","git_url":"git://github.com/nporpigliaglobant/Kanban.git","ssh_url":"git@github.com:nporpigliaglobant/Kanban.git","clone_url":"https://github.com/nporpigliaglobant/Kanban.git","svn_url":"https://github.com/nporpigliaglobant/Kanban","homepage":null,"size":28092,"stargazers_count":1,"watchers_count":1,"language":"Objective-C","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":2,"forks":0,"open_issues":2,"watchers":1,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/nporpigliaglobant/Kanban/pulls/49"},"html":{"href":"https://github.com/nporpigliaglobant/Kanban/pull/49"},"issue":{"href":"https://api.github.com/repos/nporpigliaglobant/Kanban/issues/49"},"comments":{"href":"https://api.github.com/repos/nporpigliaglobant/Kanban/issues/49/comments"},"review_comments":{"href":"https://api.github.com/repos/nporpigliaglobant/Kanban/pulls/49/comments"},"review_comment":{"href":"https://api.github.com/repos/nporpigliaglobant/Kanban/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/nporpigliaglobant/Kanban/pulls/49/commits"},"statuses":{"href":"https://api.github.com/repos/nporpigliaglobant/Kanban/statuses/2bee7876fba804e6561f04bfa0668488e8d9063a"}}}}