{"id":19856965,"url":"https://github.com/johnvuko/jtscrollviewcontroller","last_synced_at":"2025-07-27T22:33:44.851Z","repository":{"id":22582533,"uuid":"25924132","full_name":"johnvuko/JTScrollViewController","owner":"johnvuko","description":"Create a ScrollViewController on iOS pragmatically using Auto Layout without a nib file.","archived":false,"fork":false,"pushed_at":"2015-05-30T16:37:36.000Z","size":274,"stargazers_count":31,"open_issues_count":0,"forks_count":3,"subscribers_count":6,"default_branch":"master","last_synced_at":"2025-05-02T02:38:37.723Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"Objective-C","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":"zwmlzaq/docker-kong","license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/johnvuko.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2014-10-29T14:14:58.000Z","updated_at":"2023-01-12T16:38:34.000Z","dependencies_parsed_at":"2022-07-26T03:02:15.236Z","dependency_job_id":null,"html_url":"https://github.com/johnvuko/JTScrollViewController","commit_stats":null,"previous_names":["johnvuko/jtscrollviewcontroller"],"tags_count":7,"template":false,"template_full_name":null,"purl":"pkg:github/johnvuko/JTScrollViewController","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/johnvuko%2FJTScrollViewController","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/johnvuko%2FJTScrollViewController/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/johnvuko%2FJTScrollViewController/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/johnvuko%2FJTScrollViewController/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/johnvuko","download_url":"https://codeload.github.com/johnvuko/JTScrollViewController/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/johnvuko%2FJTScrollViewController/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":267436567,"owners_count":24086898,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-07-27T02:00:11.917Z","response_time":82,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-11-12T14:17:05.568Z","updated_at":"2025-07-27T22:33:44.804Z","avatar_url":"https://github.com/johnvuko.png","language":"Objective-C","funding_links":[],"categories":[],"sub_categories":[],"readme":"# JTScrollViewController\n\n[![CI Status](http://img.shields.io/travis/jonathantribouharet/JTScrollViewController.svg)](https://travis-ci.org/jonathantribouharet/JTScrollViewController)\n![Version](https://img.shields.io/cocoapods/v/JTScrollViewController.svg)\n![License](https://img.shields.io/cocoapods/l/JTScrollViewController.svg)\n![Platform](https://img.shields.io/cocoapods/p/JTScrollViewController.svg)\n\nJTScrollViewController help you to create pragmatically a UIViewController with a UIScrollView which take all the space available using Auto Layout without using a nib file.\nIt creates all constraints required for your views.\n\n## Installation\n\nWith [CocoaPods](http://cocoapods.org/), add this line to your Podfile.\n\n\tpod 'JTScrollViewController', '~\u003e 1.0'\n\n\n## Usage\n\nCreate a controller which inherit from JTScrollViewController.\n```objective-c\n#import \u003cUIKit/UIKit.h\u003e\n#import \u003cJTScrollViewController.h\u003e\n\n@interface MyViewController : JTScrollViewController\n\n@end\n```\n\nCreate your views in the `viewDidLoad` and call `configureConstraintsForSubviews` for create all constraints.\nYou can call `addVerticalSpacingForStatusBar` when you don't want the scrollView go under the status bar.\n\nEach views are displayed in the orders they were added to `contentView`.\nYou have to set the height of each views by setting the height of their frames.\nYou can also add a space between each views by settings `y` property of their frames. \n\n```objective-c\n#import \"MyViewController.h\"\n\n@implementation MyViewController\n\n- (void)viewDidLoad\n{\n    [super viewDidLoad];\n    \n    // Add all your views to self.contentView\n    // Do your stuff...\n    {\n        CGFloat spaceFromTop = 30.;\n        UITextField *textField = [UITextField alloc] initWithFrame:CGRectMake(0, spaceFromTop, 0, 45)];\n        [self.contentView addSubview:textField];\n    }\n    \n    {\n        UITextField *textField = [UITextField alloc] initWithFrame:CGRectMake(0, 5, 0, 45)];\n        [self.contentView addSubview:textField];\n    }\n\n    {\n    \tUIButton *button = [[UIButton alloc] initWithFrame:CGRectMake(0, 10, 0, 50)];\n        [self.contentView addSubview:button];\n    }\n\n    // Add vertical space (22px) for the status bar\n    // Use this when you don't have a navigation bar and you don't want the scroll go under the status bar\n    [self addVerticalSpacingForStatusBar:YES];\n\n    // Call configureConstraintsForSubviews for create all constraints\n    [self configureConstraintsForSubviews];\n}\n```\n\n## Requirements\n\n- iOS 7 or higher\n- Automatic Reference Counting (ARC)\n\n## Author\n\n- [Jonathan Tribouharet](https://github.com/jonathantribouharet) ([@johntribouharet](https://twitter.com/johntribouharet))\n\n## License\n\nJTScrollViewController is released under the MIT license. See the LICENSE file for more info.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjohnvuko%2Fjtscrollviewcontroller","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjohnvuko%2Fjtscrollviewcontroller","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjohnvuko%2Fjtscrollviewcontroller/lists"}