Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/tichise/materialdesignsymbol
Icon font library for Swift. Currently supports GoogleMaterialDesignIcons
https://github.com/tichise/materialdesignsymbol
cocoapods font font-library material-design objectivec swift swiftui
Last synced: 3 months ago
JSON representation
Icon font library for Swift. Currently supports GoogleMaterialDesignIcons
- Host: GitHub
- URL: https://github.com/tichise/materialdesignsymbol
- Owner: tichise
- License: mit
- Created: 2015-05-09T09:31:26.000Z (over 9 years ago)
- Default Branch: master
- Last Pushed: 2023-02-01T13:33:50.000Z (about 2 years ago)
- Last Synced: 2024-10-29T10:47:06.093Z (3 months ago)
- Topics: cocoapods, font, font-library, material-design, objectivec, swift, swiftui
- Language: Swift
- Homepage:
- Size: 399 KB
- Stars: 95
- Watchers: 8
- Forks: 10
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE.txt
Awesome Lists containing this project
README
#### MaterialDesignSymbol
Icon font library for Swift. Currently supports GoogleMaterialDesignIcons. ObjectiveC version is [here](https://github.com/tichise/MaterialDesignSymbolObjC).
#### Image
![image](https://user-images.githubusercontent.com/43707/89850548-8edb5300-dbc5-11ea-8cab-2b3be7faf06f.png)
#### Licence
font used in this projectAuthor of the font used in this project: Google
Link: https://github.com/google/material-design-iconsCreative Commons Attribution 4.0 International (CC BY 4.0)
#### Examples Swift
##### UIKit / UIImage
```html
import MaterialDesignSymbollet symbol = MaterialDesignSymbol(text:MaterialDesignIcon.list48px, size:25)
symbol.addAttribute(attributeName: NSAttributedStringKey.foregroundColor, value: UIColor.red)
let iconImage = symbol.image(size: CGSize(width:25, height:25))
```or
```
import MaterialDesignSymbollet iconImage = MaterialDesignSymbol(icon: .viewHeadline48px, size: 30).image()
```##### UIKit / UILabel
```html
import MaterialDesignSymboltitleLabel.font = MaterialDesignFont.fontOfSize(20)
titleLabel.text = MaterialDesignIcon.list48px
```#### Examples ObjectiveC
Support for Objective C has ended with version 2.3.2.
If you want to call from Objective C, please use ver 2.3.2 or earlier.##### Image
```html
@import MaterialDesignSymbol;
MaterialDesignSymbol *symbol = [[MaterialDesignSymbol alloc] initWithText:[MaterialDesignIcon home48px] size:30];
[symbol addAttributeWithAttributeName:NSForegroundColorAttributeName value:[UIColor blackColor]];
sampleImageView.image = [symbol imageWithSize:CGSizeMake(30, 30)];
```##### Text
```html
@import MaterialDesignSymbol;sampleLabel.font = [MaterialDesignFont fontOfSize:20];
sampleLabel.text = [MaterialDesignIcon clear48px];
```#### Installation (CocoaPods)
`pod MaterialDesignSymbol`