{"id":13696220,"url":"https://github.com/mrustaa/ContainerView","last_synced_at":"2025-05-03T16:33:04.513Z","repository":{"id":56906574,"uuid":"154384060","full_name":"mrustaa/ContainerView","owner":"mrustaa","description":"ContainerView is designed to add a cool swim from the bottom to the animation with the effect of scale, controlled by the help of a gesture, scrollView also takes control. The idea is taken from the application: https://www.apple.com/ios/maps/","archived":false,"fork":false,"pushed_at":"2022-06-04T14:08:48.000Z","size":92530,"stargazers_count":263,"open_issues_count":1,"forks_count":33,"subscribers_count":10,"default_branch":"master","last_synced_at":"2025-04-16T07:11:12.232Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Objective-C","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/mrustaa.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":"2018-10-23T19:19:18.000Z","updated_at":"2024-10-31T11:00:40.000Z","dependencies_parsed_at":"2022-08-21T03:20:50.387Z","dependency_job_id":null,"html_url":"https://github.com/mrustaa/ContainerView","commit_stats":null,"previous_names":[],"tags_count":9,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mrustaa%2FContainerView","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mrustaa%2FContainerView/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mrustaa%2FContainerView/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mrustaa%2FContainerView/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/mrustaa","download_url":"https://codeload.github.com/mrustaa/ContainerView/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":252216142,"owners_count":21713104,"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","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-08-02T18:00:37.444Z","updated_at":"2025-05-03T16:32:59.496Z","avatar_url":"https://github.com/mrustaa.png","language":"Objective-C","funding_links":[],"categories":["UI Components","Objective-C"],"sub_categories":[],"readme":"# ContainerView \n\nContainerView is designed to add a cool swim from the bottom to the animation with the effect of scale, controlled by the help of a gesture, scrollView also takes control. \n\nThe idea is taken from the application [Apple Maps](https://www.apple.com/ios/maps/)\n\n______________________________\nAlso, ☝️ See the new version `Swift` [ContainerController](https://github.com/mrustaa/ContainerController/) \n\n## Preview\n![image](https://github.com/mrustaa/gif_presentation/blob/master/Assets/1.gif)\n![image](https://github.com/mrustaa/gif_presentation/blob/master/Assets/2.gif)\n![image(Landscape)](https://github.com/mrustaa/gif_presentation/blob/master/Assets/3.gif)\n\n\u003c!-- TOC --\u003e\n\n- [Installation](#installation)\n  - [CocoaPods](#cocoapods)\n- [Getting Started](#getting-started)\n- [Setting](#setting)\n  - [Change position Top Middle Bottom](#change-position-top-middle-bottom)\n- [Adding Custom View](#adding-custom)\n  - [`View` under ContainerView](#view-under-containerview)\n  - [`ScrollView` in ContainerView](#scrollview-in-containerview)\n  - [`HeaderView` in ContainerView](#headerview-in-containerview)\n- [Protocol](#protocol)\n  - [Reports the changes current position of the container, after its use](#reports-the-changes-current-position-of-the-container-after-its-use)\n- [License](#license)\n\n\u003c!-- /TOC --\u003e\n\n## Installation\n\n### CocoaPods\n\nContainerView is available through [CocoaPods](https://cocoapods.org). To install\nit, simply add the following line to your Podfile:\n\n```ruby\npod 'ContainerView'\n```\n\n## Getting Started\n\n```objc\n#import \u003cUIKit/UIKit.h\u003e\n#import \"ContainerViewController.h\"\n\n@interface ViewController : ContainerViewController\n@end\n```\n\n## Setting\n\n```objc\n- (void)viewDidLoad {\n    [super viewDidLoad];\n    \n    // This parameter for changing the rounding corner radius of the Container\n    self.containerCornerRadius = 15;\n\n    // This parameter to add a blur to the background of the Container\n    self.containerStyle = ContainerStyleLight;\n    \n    // This parameter adds 3 position (move to the middle). Default there are 2 positions\n    self.containerAllowMiddlePosition = YES;\n    \n    // This parameter allows you to zoom in on the screen under Container\n    self.containerZoom = YES;\n    \n    // This parameter sets the shadow under Container\n    self.containerShadowView = YES;\n\n    // This parameter sets the shadow in Container\n    self.containerShadow = YES;\n\n    // This parameter indicates whether to add a button when the container is at the bottom to move the container to the top\n    self.containerBottomButtonToMoveTop = YES;\n}\n```\n\n### Change position Top Middle Bottom\n\n```objc\n- (void)viewDidLoad {\n    [super viewDidLoad];\n    \n    // These parameters set the new position value.\n    self.containerTop     = 50;\n    self.containerMiddle  = 200;\n    self.containerBottom  = 400;\n}\n```\n\n### Move position with an animation\n\n```objc\n- (void)moveTop {\n    [self containerMove:ContainerMoveTypeTop];\n}\n\n- (void)moveMiddle {\n    [self containerMove:ContainerMoveTypeMiddle];\n}\n\n- (void)moveBottom {\n    [self containerMove:ContainerMoveTypeBottom];\n}\n```\n\n## Adding Custom\n\n### `View` under ContainerView\n\n#### ☝️ Adding all views under the ContainerView necessarily via the `self.bottomView`\n\n```objc\n- (void)viewDidLoad {\n    [super viewDidLoad];\n    \n    UILabel *label = [[UILabel alloc]initWithFrame: CGRectMake(18, 26, 60, 30 )];\n    label.font = [UIFont boldSystemFontOfSize:24];\n    label.textColor = [UIColor redColor];\n    label.text = @\"Label\";\n    \n    [self.bottomView addSubview:label];\n}\n```\n\n### `ScrollView` in ContainerView\n\n#### ☝️ For all `ScrollView`, add the `self` delegate. Otherwise, moving the container through scrolling will not work.\n\n```objc\n@interface ViewController () \u003cUITextViewDelegate\u003e\n@end\n\n@implementation ViewController\n\n- (void)viewDidLoad {\n    [super viewDidLoad];\n    \n    UITextView *textView = [[UITextView alloc]initWithFrame:self.view.bounds];\n    textView.delegate = self;\n    textView.returnKeyType = UIReturnKeyDone;\n    textView.backgroundColor = [UIColor clearColor];\n    textView.font = [UIFont systemFontOfSize:46];\n    textView.text = @\"This \\n example \\n more \\n text \\n\\n\\n\\n\\n\\n\\n\\n ....\";\n    \n    [self.containerView addSubview:textView];\n}\n\n@end\n```\n\n### `HeaderView` in ContainerView\n\n```objc\n- (void)addHeader {\n\n    CGFloat height = 60;\n    \n    UIView *headerView = [[UIView alloc] initWithFrame:CGRectMake(0, 0, self.view.frame.size.width, height)];\n    \n    UISearchBar *searchBar = [[UISearchBar alloc] initWithFrame:CGRectMake(0, 4, self.view.frame.size.width, height -4)];\n    searchBar.barStyle = UIBarStyleDefault;\n    searchBar.searchBarStyle = UISearchBarStyleMinimal;\n    searchBar.placeholder = @\"Search\";\n    [headerView addSubview:searchBar];\n    \n    self.containerView.headerView = headerView;\n}\n```\n\n## Protocol\n\n### Reports the changes current position of the container, after its use\n\n```objc\n@interface ViewController () \u003cContainerViewDelegate\u003e\n@end\n\n@implementation ViewController\n\n- (void)changeContainerMove:(ContainerMoveType)containerMove containerY:(CGFloat)containerY animated:(BOOL)animated {\n    [super changeContainerMove:containerMove containerY:containerY animated:animated];\n    ...\n}\n\n@end\n```\n\n## Author\n\n\u003cmotionrustam@gmail.com\u003e 📩| [mrustaa](https://github.com/mrustaa/) NOVEMBER 2018 \n\n## License\n\nContainerView is available under the MIT license. See the LICENSE file for more info.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmrustaa%2FContainerView","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmrustaa%2FContainerView","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmrustaa%2FContainerView/lists"}