From 91f9ac8feb27ef5468467f275d01cadc76ff942b Mon Sep 17 00:00:00 2001 From: tichise <43707+tichise@users.noreply.github.com> Date: Sat, 10 Jan 2026 11:04:03 +0900 Subject: [PATCH] Remove CocoaPods support - Delete MaterialDesignSymbol.podspec - Update README.md with SPM installation instructions - Remove outdated screenshot image - Remove ObjectiveC examples (deprecated) - Add SwiftUI usage example CocoaPods support has been discontinued. Please use Swift Package Manager for installation. Co-Authored-By: Claude Opus 4.5 --- MaterialDesignSymbol.podspec | 24 ---------- README.md | 89 +++++++++++++++++++----------------- 2 files changed, 48 insertions(+), 65 deletions(-) delete mode 100644 MaterialDesignSymbol.podspec diff --git a/MaterialDesignSymbol.podspec b/MaterialDesignSymbol.podspec deleted file mode 100644 index c239427..0000000 --- a/MaterialDesignSymbol.podspec +++ /dev/null @@ -1,24 +0,0 @@ -Pod::Spec.new do |s| - s.name = 'MaterialDesignSymbol' - s.version = '2.8.3' - s.license = { - :type => "MIT", - :text => <<-LICENSE - Copyright (c) 2015 - 2021 Takuya Ichise - Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: - The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. - THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - LICENSE - } - s.summary = 'Icon font library for Swift. Currently supports Google Material Design Icon' - s.homepage = 'https://github.com/tichise/MaterialDesignSymbol' - s.social_media_url = 'http://twitter.com/tichise' - s.author = "Takuya Ichise" - s.source = { :git => 'https://github.com/tichise/MaterialDesignSymbol.git', :tag => s.version } - - s.ios.deployment_target = '11.0' - s.swift_versions = '5.0' - s.source_files = 'Sources/MaterialDesignSymbol/*.swift' - s.requires_arc = true - s.resources = 'Sources/MaterialDesignSymbol/Resources/*.ttf' -end diff --git a/README.md b/README.md index 8faf3f6..f05b591 100644 --- a/README.md +++ b/README.md @@ -1,72 +1,79 @@ -#### MaterialDesignSymbol +# MaterialDesignSymbol -Icon font library for Swift. Currently supports GoogleMaterialDesignIcons. ObjectiveC version is [here](https://github.com/tichise/MaterialDesignSymbolObjC). +Icon font library for Swift. Currently supports Google Material Design Icons. -#### Image +## Requirements -![image](https://user-images.githubusercontent.com/43707/89850548-8edb5300-dbc5-11ea-8cab-2b3be7faf06f.png) +- iOS 16.0+ +- watchOS 9.0+ +- Swift 5.0+ -#### Licence -font used in this project +## Installation -Author of the font used in this project: Google -Link: https://github.com/google/material-design-icons +### Swift Package Manager -Creative Commons Attribution 4.0 International (CC BY 4.0) +Add via Xcode: File > Add Package Dependencies... -#### Examples Swift +``` +https://github.com/tichise/MaterialDesignSymbol.git +``` -##### UIKit / UIImage +## Usage -```html +### UIImage + +```swift import MaterialDesignSymbol -let 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)) +let symbol = MaterialDesignSymbol(icon: .home48px, size: 30) +let iconImage = symbol.image() ``` -or +With color: +```swift +let symbol = MaterialDesignSymbol(icon: .home48px, size: 30) +symbol.addAttribute(foregroundColor: .red) +let iconImage = symbol.image() ``` -import MaterialDesignSymbol -let iconImage = MaterialDesignSymbol(icon: .viewHeadline48px, size: 30).image() +With custom size: + +```swift +let symbol = MaterialDesignSymbol(icon: .home48px, size: 25) +let iconImage = symbol.image(size: CGSize(width: 50, height: 50)) ``` -##### UIKit / UILabel +### UILabel -```html +```swift import MaterialDesignSymbol -titleLabel.font = MaterialDesignFont.fontOfSize(20) -titleLabel.text = MaterialDesignIcon.list48px +titleLabel.font = MaterialDesignFont.shared.fontOfSize(20) +titleLabel.text = MaterialDesignIconEnum.home48px.rawValue ``` -#### 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. +### SwiftUI -##### Image -```html -@import MaterialDesignSymbol; +```swift +import SwiftUI +import MaterialDesignSymbol - -MaterialDesignSymbol *symbol = [[MaterialDesignSymbol alloc] initWithText:[MaterialDesignIcon home48px] size:30]; -[symbol addAttributeWithAttributeName:NSForegroundColorAttributeName value:[UIColor blackColor]]; -sampleImageView.image = [symbol imageWithSize:CGSizeMake(30, 30)]; +struct ContentView: View { + var body: some View { + Image(uiImage: MaterialDesignSymbol(icon: .home48px, size: 30).image()) + } +} ``` -##### Text +## License -```html -@import MaterialDesignSymbol; +### Font License -sampleLabel.font = [MaterialDesignFont fontOfSize:20]; -sampleLabel.text = [MaterialDesignIcon clear48px]; -``` +Author: Google +Link: https://github.com/google/material-design-icons +License: Apache License 2.0 +### Library License -#### Installation (CocoaPods) -`pod MaterialDesignSymbol` +MIT License