{"id":13611464,"url":"https://github.com/Spaceman-Labs/SMPageControl","last_synced_at":"2025-04-13T04:34:34.274Z","repository":{"id":5048595,"uuid":"6209805","full_name":"Spaceman-Labs/SMPageControl","owner":"Spaceman-Labs","description":"A drop in replacement for UIPageControl with a slew of additional customization options.","archived":false,"fork":false,"pushed_at":"2019-07-07T11:55:33.000Z","size":478,"stargazers_count":1873,"open_issues_count":16,"forks_count":220,"subscribers_count":95,"default_branch":"master","last_synced_at":"2024-10-29T17:41:19.429Z","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":"alibaba/tengine","license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Spaceman-Labs.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":"2012-10-14T02:29:54.000Z","updated_at":"2024-09-09T17:01:47.000Z","dependencies_parsed_at":"2022-07-07T22:28:43.502Z","dependency_job_id":null,"html_url":"https://github.com/Spaceman-Labs/SMPageControl","commit_stats":null,"previous_names":[],"tags_count":3,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Spaceman-Labs%2FSMPageControl","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Spaceman-Labs%2FSMPageControl/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Spaceman-Labs%2FSMPageControl/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Spaceman-Labs%2FSMPageControl/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Spaceman-Labs","download_url":"https://codeload.github.com/Spaceman-Labs/SMPageControl/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":222149745,"owners_count":16939404,"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-01T19:01:55.664Z","updated_at":"2024-11-07T18:30:31.496Z","avatar_url":"https://github.com/Spaceman-Labs.png","language":"Objective-C","readme":"# SMPageControl\n\nUIPageControl’s Fancy One-Upping Cousin.\n\nDesigners _love_ to make beautifully custom page controls that fit in with all the wood, gradients, and inner shadows they've worked so hard perfecting. \n\nWho can blame them?! SMPageControl makes it dead simple to give them what they want. Even better, SMPageControl is a _drop in_ replacement for UIPageControl. It mirrors all the functions of UIPageControl, with literally no changes beyond the class name.\n\n\n[Apps Currently Using SMPageControl](https://github.com/Spaceman-Labs/SMPageControl/wiki/Apps)\n\n**Using SMPageControl in your application? Let us know, and we'll add your app the list of apps!** \u003cmailto:spaceman@spacemanlabs.com\u003e\n\n## Moar Customization!\n\nSMPageControl has a variety of simple (yet powerful) areas of customization, and most all of them support the UIAppearance Proxy available to iOS 5.0 and newer.\n\n* Indicator Size\n* Indicator Spacing\n* Indicator Alignment\n* Images as Indicators\n* Image Masks as Indicators\n* Per-Indicator Customization\n* Directly Tappable Indicators\n* Extensive Support for UIAppearance\n* Extended Support for UIAccessibility\n* iOS 7 Ready\n\n![Screenshot](http://spacemanlabs.com/github/SMPageControl-4.png) ![Screenshot](http://spacemanlabs.com/github/SMPageControl-5.png)\n\n## Example Usage\n\n``` objective-c\nSMPageControl *pageControl = [[SMPageControl alloc] init];\npageControl.numberOfPages = 10;\npageControl.pageIndicatorImage = [UIImage imageNamed:@\"pageDot\"];\npageControl.currentPageIndicatorImage = [UIImage imageNamed:@\"currentPageDot\"];\n[pageControl sizeToFit];\n[self.view addSubview:pageControl];\n\n```\n\n## Direct Page Selection\n\nBecause SMPageControl has such a high degree of flexibility, it's not uncommon for indicator images to be large enough to tap directly. The `tapBehavior` property allows the page control indicators to be individually tappable.\n\n``` objective-c\nSMPageControl *pageControl = [[SMPageControl alloc] init];\npageControl.tapBehavior = SMPageControlTapBehaviorJump;\n```\n\n## UIAccessibility Additions\n\nUIPageControl (like all Apple controls) provides out of the box support for UIAccessibility. The default behavior is to set the accessibility value to \"page [current page + 1] of [number of pages]\". e.g. \"page 1 of 10\"\n\nSMPageControl provides the exact same functionality, but also allows you to name individual pages. This is extremely useful when using per page indicator images, where one or more page is likely to have a specific usage that is identifiable to the user.\n\n``` objective-c\nSMPageControl *pageControl = [[SMPageControl alloc] init];\n[pageControl setImage:[UIImage imageNamed:@\"searchDot\"] forPage:0];\n[pageControl setCurrentImage:[UIImage imageNamed:@\"currentSearchDot\"] forPage:0];\n[pageControl setImage:[UIImage imageNamed:@\"appleDot\"] forPage:1];\n[pageControl setCurrentImage:[UIImage imageNamed:@\"currentAppleDot\"] forPage:1];\n[pageControl setName:@\"Search\" forPage:0];\n[pageControl setName:@\"Apple\" forPage:1];\n\n```\n\n![Screenshot](http://spacemanlabs.com/github/SMPageControl-3.png)\n\n## More Info\n\nThe original blog post for this project can be found [here](http://www.ultrajoke.net/2012/10/smpagecontrol/).\n\n\nLICENSE\n-------\n\nCopyright (C) 2012 by Spaceman Labs\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in\nall copies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\nTHE SOFTWARE.","funding_links":[],"categories":["Objective-C","Objective-C  Stars 1000以内排名整理","etc"],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FSpaceman-Labs%2FSMPageControl","html_url":"https://awesome.ecosyste.ms/projects/github.com%2FSpaceman-Labs%2FSMPageControl","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FSpaceman-Labs%2FSMPageControl/lists"}