ios - Material icons library is not detected on Xcode -


i trying use material icons library on swift application on xcode cannot make library detected project.

the steps have followed:

  • from here have copied link use git repository.
  • on terminal, have go through project folder , use link have copied before.
  • xcode project not detect drag folder project cannot use it.

am doing in wrong way?

thanks in advance!

as @ericaya pointed following wrong steps. saw there steps use material icons ios says in documentation:

material icons work within ios apps. in both material icons library , git repository, these icons packaged in xcode imagesets work xcode asset catalogs (xcassets).

i guessed installed git repository not it. used following steps:

  • go official webpage of material icons , click on icon use.

  • you see on right corner of webpage 2 options download icon (svg or png). have chosen png.

  • unzip .zip package.

  • open ios folder , drag .imageset folder .xcassets file in project of xcode.

  • you can create both imageview or button set , use following code create image:

    uiimage(named:"ic_close")?.imagewithrenderingmode(uiimagerenderingmode.alwaystemplate)

    to set uiimageview can use yourimage.image , button yourbutton.setimage().

  • do not forget change tint property of imageview or button. spent hours thinking not working , problem tint property white (sometimes simpler things make waste time easily).


Comments