Context: To allow us to create APIs for our users to set different appearances based on the different states the drawer can be in, we need to create an initial state system. The Problem: Without defining a state for our drawer, we won't be able to differentiate between different presentations the drawer may be in, and then alter the drawer's appearance effectively. The Fix: Provide a state enum as part of MDCBottomDrawerController, that is read only, and is set using a delegate that is initially set by the internal implementation. Testing: Unit Tests + Tested on an iPhone X and iPhone 7 with smaller and bigger preferredContentSize to imitate different states. Related Bugs: Closes #5524
Material Components for iOS
Material Components for iOS (MDC-iOS) helps developers execute Material Design. Developed by a core team of engineers and UX designers at Google, these components enable a reliable development workflow to build beautiful and functional iOS apps. Learn more about how Material Components for iOS supports design and usability best practices across platforms in the Material Design Platform Adaptation guidelines.
Material Components for iOS are written in Objective-C and support Swift and Interface Builder.
Useful Links
- Documentation (external site)
- How To Use MDC-iOS
- All Components
- Demo Apps
- Contributing
- MDC-iOS on Stack Overflow (external site)
- Material.io (external site)
- Material Design Guidelines (external site)
- Checklist status spreadsheet
- Discord Chat Room
Trying out Material Components
CocoaPods is the easiest way to get started (if you're new to CocoaPods, check out their getting started documentation.)
To install CocoaPods, run the following commands:
sudo gem install cocoapods
Our catalog showcases Material Components. You can use the pod try command from anywhere on your machine to try the components, even if you haven't checked out the repo yet:
pod try MaterialComponents
In case you have already checked out the repo, run the following command:
pod install --project-directory=catalog/
The component implementations can be found in Xcode within Pods > Development Pods > MaterialComponents.
Requirements
- Xcode 9 or higher
- Minimum iOS deployment target of 8.0 or higher
- CocoaPods 1.5 or higher
Attributions
Material Components for iOS uses Material Design icons, copyright Google Inc. and licensed under CC BY 4.0.
Several components use MDFTextAccessibility, copyright Google Inc. and licensed under Apache 2.0 without a NOTICE file.
MDCCatalog uses the Roboto font, copyright 2011 Google Inc. and licensed under Apache 2.0 without a NOTICE file.