通过路径获取图片及改变图片颜色

2023-05-20,

        NSString *starsPath = [[NSBundle mainBundle] pathForResource:@"star" ofType:@"png"];

        UIImage *theImage = [[UIImage alloc] initWithContentsOfFile:starsPath];

        theImage= [theImage p_w_picpathWithRenderingMode:UIImageRenderingModeAlwaysTemplate];

        stars.tintColor = [UIColor orangeColor];

        stars.p_w_picpath = theImage;

《通过路径获取图片及改变图片颜色.doc》

下载本文的Word格式文档,以方便收藏与打印。