{"id":15030446,"url":"https://github.com/marcosgriselli/sizes","last_synced_at":"2025-10-04T07:28:35.077Z","repository":{"id":42443990,"uuid":"149445959","full_name":"marcosgriselli/Sizes","owner":"marcosgriselli","description":"View your app on different device and font sizes ","archived":false,"fork":false,"pushed_at":"2022-10-06T02:30:42.000Z","size":3101,"stargazers_count":1228,"open_issues_count":7,"forks_count":53,"subscribers_count":14,"default_branch":"master","last_synced_at":"2025-05-15T03:51:33.064Z","etag":null,"topics":["accessibility","device","ios","orientation","sizeclasses","sizes","swift","uifont","uikit"],"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/marcosgriselli.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2018-09-19T12:17:26.000Z","updated_at":"2025-03-21T18:33:09.000Z","dependencies_parsed_at":"2022-09-17T22:11:04.593Z","dependency_job_id":null,"html_url":"https://github.com/marcosgriselli/Sizes","commit_stats":null,"previous_names":[],"tags_count":15,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/marcosgriselli%2FSizes","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/marcosgriselli%2FSizes/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/marcosgriselli%2FSizes/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/marcosgriselli%2FSizes/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/marcosgriselli","download_url":"https://codeload.github.com/marcosgriselli/Sizes/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":254493378,"owners_count":22080126,"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":["accessibility","device","ios","orientation","sizeclasses","sizes","swift","uifont","uikit"],"created_at":"2024-09-24T20:13:22.466Z","updated_at":"2025-10-04T07:28:30.039Z","avatar_url":"https://github.com/marcosgriselli.png","language":"Swift","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003cimg width=\"100%\" style=\"margin: 0 0 0 -20px\" src=\"https://cdn.jsdelivr.net/gh/marcosgriselli/Sizes@92ced2ee616420c03911883df4d26649ab2317aa/Assets/sizes.svg\"/\u003e\n\n![Version](https://img.shields.io/cocoapods/v/Sizes.svg)\n![Swift 5.2](https://img.shields.io/badge/Swift-5.2-orange.svg)\n![iOS 10.0+](https://img.shields.io/badge/Platforms-iOS-blue.svg?style=flat)\n![Cartage](https://img.shields.io/badge/carthage-compatible-4BC51D.svg?style=flat)\n[![codecov](https://codecov.io/gh/marcosgriselli/Sizes/branch/master/graph/badge.svg)](https://codecov.io/gh/marcosgriselli/Sizes)\n![Bitrise](https://app.bitrise.io/app/02750afc49040d6e.svg?token=rkcro6IeTOoi0785LC7DkA)\n![License](https://img.shields.io/cocoapods/l/Sizes.svg?style=flat)\n\nSizes reduces the time it takes to evaluate all of our apps possible device sizes, orientations and font combinations. With Sizes we'll avoid launching all the supported devices simulator, running our app and navigating through each screen manually which not only takes a lot of time but its also highly error prone since we sometimes forget to test one particular combination and we ship a screen with a layout bug to the App Store.\n\n## ⚠️ Sizes deprecation recommendation\n\nXcode 11 introduced Previews which is a fantastic way to quickly validate your UI in multiple scenarios just like Sizes did. If you'd like to know more about Xcode Previews I recommend [this WWDC session](https://developer.apple.com/videos/play/wwdc2019/233/). You can even use [Previews with UIKit](https://nshipster.com/swiftui-previews/) so there's no reason to stick to this library.\n\nThis library will be deprecated and the repo will be archived in the future.\n\n## 📱 Sizes in action\n\n\u003cimg src=\"https://cdn.jsdelivr.net/gh/marcosgriselli/Sizes@92ced2ee616420c03911883df4d26649ab2317aa/Assets/sizes_short.gif\"/\u003e\n\n*Recorded on an 10.5 inch iPad Pro*\n\n[\u003cimg src=\"./Assets/pointFree_banner.png\"/\u003e](https://www.pointfree.co)\n\nSizes was created as a port of [Brandon Williams](https://twitter.com/mbrandonw) and [Stephen Celis](https://twitter.com/stephencelis) in Playgrounds for the [Kickstarter iOS app](https://github.com/kickstarter/ios-oss) and further explained in [PointFree](https://www.pointfree.co) to iOS. Make sure to check their site out! \n\n## 🌟 Features\n\n- [x] Inspect your app in multiple device sizes\n- [x] Switch orientations\n- [x] Test all font sizes\n- [x] Universal (iPhone \u0026 iPad)\n\n### 💡 Demo\n\nTo run the demo project, clone the repo and run `Sizes` target.\n\n## 📲 Installation\n\n#### Using [CocoaPods](https://cocoapods.org)\n\nEdit your `Podfile` and specify the dependency:\n\n```ruby\npod 'Sizes'\n```\n\n#### Using [Carthage](https://github.com/carthage)\n\nEdit your `Cartfile` and specify the dependency:\n\n```bash\ngithub \"marcosgriselli/Sizes\"\n```\n\n## 👩‍💻 How to use\n\n### Preparations\n\nSizes require you to use [Auto Layout]((https://developer.apple.com/library/archive/documentation/UserExperience/Conceptual/AutolayoutPG/)) in order to update the UI correctly with each change.\n\nFor font updates you'll need to use [Dynamic Type](https://developer.apple.com/design/human-interface-guidelines/ios/visual-design/typography/).\n\n**Programmatically:**\n\n```swift \nlet label = UILabel()\nlabel.font = UIFont.preferredFont(forTextStyle: .headline, compatibleWith: traitCollection)\nlabel.adjustsFontForContentSizeCategory = true\n```\n\n**IB/Storyboard:**\n\n\u003cimg src=\"https://cdn.jsdelivr.net/gh/marcosgriselli/Sizes@92ced2ee616420c03911883df4d26649ab2317aa/Assets/inspector.png\"/\u003e\n\n### Setup\n\nI highly recommend you only use this while on `#DEBUG` mode.\n\nThe best way to setup Sizes is to use the `SizesWindow` as your `AppDelegates'` window. This will automatically make a `SizesViewController` instance contain your apps root view controller and you'll still be able to use code like `UIApplication.shared.windows.first?.rootViewController as? YourInitialCustomViewController` with no issues. \n\n```swift\nfunc application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?) -\u003e Bool {\n    #if DEBUG\n        window = SizesWindow()\n        window?.rootViewController = UIStoryboard(name: \"Main\", bundle: nil).instantiateInitialViewController()!\n        window?.makeKeyAndVisible()\n    #endif\n    return true\n}\n```\n\n### Usage\n\nShake to display the Sizes configuration UI, then tap on one of the orientation/device options to trigger a change. Or update the Text size slider to navigate through the different font sizes, you'll get the font name as you slide. You can check a longer video implementation and some of the use cases of Sizes in [this tweet](https://twitter.com/marcosgriselli/status/1038459645596250114)\n\n\u003cimg width=\"200px\" src=\"https://cdn.jsdelivr.net/gh/marcosgriselli/Sizes@92ced2ee616420c03911883df4d26649ab2317aa/Assets/example.jpeg\"/\u003e\n\n\n## 🛣 Roadmap\n\nYou can check the GitHub [Project](https://github.com/marcosgriselli/Sizes/projects/1) or [Issues](https://github.com/marcosgriselli/Sizes/issues) to get an overview of new features, fixes or releases planed. \n\n## ❤️ Contributing\nThis is an open source project, so feel free to contribute. How?\n- Open an [issue](https://github.com/marcosgriselli/Sizes/issues/new).\n- Send feedback via [twitter](https://twitter.com/marcosgriselli).\n- Propose your own fixes, suggestions and open a pull request with the changes.\n\nSee [all contributors](https://github.com/marcosgriselli/Sizes/graphs/contributors)\n\n## 📣 Mentions\n\n- [iOS Goodies #250](https://ios-goodies.com/post/178728323086/week-250)\n- [AppCoda Weekly](http://digest.appcoda.com/issues/appcoda-weekly-issue-92-137765)\n- [iOS Dev Weekly](https://iosdevweekly.com/issues/373#tools) \n- [Swift Weekly](http://digest.swiftweekly.com/issues/swift-weekly-issue-133-138916)\n- [Indie iOS Focus Weekly](https://indieiosfocus.com/issues/196)\n\n## 👨‍💻 Author\nMarcos Griselli | \u003ca href=\"url\"\u003e\u003cimg src=\"https://cdn.rawgit.com/marcosgriselli/ViewAnimator/cf065e96/Resources/twitterLogo.svg\" height=\"17\"\u003e\u003c/a\u003e [@marcosgriselli](https://twitter.com/marcosgriselli)\n\n[![Twitter Follow](https://img.shields.io/twitter/follow/marcosgriselli.svg?style=social)](https://twitter.com/marcosgriselli)\n\n[![GitHub Follow](https://img.shields.io/github/followers/marcosgriselli.svg?style=social\u0026label=Follow)](https://github.com/marcosgriselli)\n\n## 🛡 License\n\n```\nMIT License\n\nCopyright (c) 2018 Marcos Griselli\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```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmarcosgriselli%2Fsizes","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmarcosgriselli%2Fsizes","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmarcosgriselli%2Fsizes/lists"}