{"id":25390445,"url":"https://github.com/saitjr/stloadinggroup","last_synced_at":"2025-04-07T07:12:22.529Z","repository":{"id":85221774,"uuid":"48940251","full_name":"saitjr/STLoadingGroup","owner":"saitjr","description":"loading views","archived":false,"fork":false,"pushed_at":"2020-03-31T20:42:40.000Z","size":3615,"stargazers_count":435,"open_issues_count":4,"forks_count":40,"subscribers_count":17,"default_branch":"master","last_synced_at":"2025-03-31T06:03:00.511Z","etag":null,"topics":["loading-animations"],"latest_commit_sha":null,"homepage":null,"language":"Swift","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/saitjr.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,"governance":null,"roadmap":null,"authors":null}},"created_at":"2016-01-03T09:16:03.000Z","updated_at":"2025-02-18T14:48:12.000Z","dependencies_parsed_at":"2023-03-30T07:36:19.449Z","dependency_job_id":null,"html_url":"https://github.com/saitjr/STLoadingGroup","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/saitjr%2FSTLoadingGroup","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/saitjr%2FSTLoadingGroup/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/saitjr%2FSTLoadingGroup/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/saitjr%2FSTLoadingGroup/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/saitjr","download_url":"https://codeload.github.com/saitjr/STLoadingGroup/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247608153,"owners_count":20965952,"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":["loading-animations"],"created_at":"2025-02-15T14:55:23.247Z","updated_at":"2025-04-07T07:12:22.507Z","avatar_url":"https://github.com/saitjr.png","language":"Swift","funding_links":[],"categories":[],"sub_categories":[],"readme":"# STLoadingGroup\n\nA Group of Loading Animations.\n\n[![STLoadingGroup](./resources/video_first_frame.png)](https://vimeo.com/183843221)\n\n## ScreenShot\n\n![](./resources/loading.gif)\n\n## Usage\n\n```swift\nlet loadingGroup = let loadingGroup = STLoadingGroup(side: side, style: style)\nloadingGroup.show(inView: view)\nloadingGroup.startLoading()\n// stop:  loadnigGroup.stopLoading()\n```\n\n#### Custom\n\nIf you want to add your own loading:\n\n​\t1\\.Comfirm `STLoadingable` and `STLoadingConfigable` protocol and implement required functions (there is a `isLoading` property left)\n\n```swift\nprotocol STLoadingable {\n    var isLoading: Bool { get }\n    \n    func startLoading()\n    func stopLoading()\n}\n\nprotocol STLoadingConfig {\n    var animationDuration: TimeInterval { get }\n    var lineWidth: CGFloat { get }\n    var loadingTintColor: UIColor { get }\n}\n```\n\n​\t2\\.Append your loading style to `STLoadingStyle` in `STLoadingGroup.swift` file\n\n```swift\nenum STLoadingStyle: String {\n    case submit = \"submit\"\n    case glasses = \"glasses\"\n    case walk = \"walk\"\n    case arch = \"arch\"\n    case bouncyPreloader = \"bouncyPreloader\"\n    case zhihu = \"zhihu\"\n    case triangle = \"triangle\"\n    case pacMan = \"pac man\"\n}\n```\n\n​\t3\\.Add initializer for your loading: `case .yourStyle:` in  `STLoadingGroup`\n\n```swift\nclass STLoadingGroup {\n    fileprivate let loadingView: STLoadingable\n    \n    init(side: CGFloat, style: STLoadingStyle) {\n        \n        let bounds = CGRect(origin: .zero, size: CGSize(width: side, height: side))\n        switch style {\n        case .submit:\n            loadingView = STSubmitLoading(frame: bounds)\n        case .glasses:\n            loadingView = STGlassesLoading(frame: bounds)\n        case .walk:\n            loadingView = STWalkLoading(frame: bounds)\n        case .arch:\n            loadingView = STArchLoading(frame: bounds)\n        case .bouncyPreloader:\n            loadingView = STBouncyPreloaderLoading(frame: bounds)\n        case .zhihu:\n            loadingView = STZhiHuLoading(frame: bounds)\n        case .triangle:\n            loadingView = STTriangleLoading(frame: bounds)\n        case .pacMan:\n            loadingView = STPacManLoading(frame: bounds)\n        // insert your code here\n        }\n    }\n}\n```\n\n## Thanks\n\n#### .glasses\n\n**Designed by** : [bingbing](https://dribbble.com/bingbing). **Dribbble link** : [click me !](https://dribbble.com/shots/2124921-togic-loading)\n\n#### .walk\n\n**Designed by** : [sandeep virk](https://dribbble.com/sandeepvirk87). **Dribbble link** : [click me !](https://dribbble.com/shots/2341109-Loading)\n\n#### .arch\n\n**Designed by** : [John LaPrime](https://dribbble.com/johnlaprime). **Dribbble link** : [click me !](https://dribbble.com/shots/2392622-Loading-Animation)\n\n#### .bouncyPreloader\n\n**Designed by** :  [Joash Berkeley](https://dribbble.com/JoashBerkeley). **Dribbble link** : [click me !](https://dribbble.com/shots/2391053-Bouncy-Preloader)\n\n#### .submit\n\nLoading animation in submit button.\n\n#### .zhiHu\n\n**Designed by** : ZhiHu daily.\n\n#### .triangle\n\nI found on web.\n\n#### .pacMan\n\n**Designed by** :  Dave Whyte\n\n## MIT LICENSE\n\n``` \n\nThe MIT License (MIT)\n\nCopyright (c) 2016 saitjr\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 all\ncopies 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 THE\nSOFTWARE.\n```","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsaitjr%2Fstloadinggroup","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsaitjr%2Fstloadinggroup","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsaitjr%2Fstloadinggroup/lists"}