zoukankan      html  css  js  c++  java
  • 图片存储

    NSData *imageData;

            if (UIImagePNGRepresentation(imageToSave) == nil) {

                imageData = UIImageJPEGRepresentation(imageToSave, 1);

            } else {

                imageData = UIImagePNGRepresentation(imageToSave);

            }

            NSString *documentPath = NSSearchPathForDirectoriesInDomains(NSDocumentDirectory, NSUserDomainMask, YES)[0];

            NSString *filePath = [documentPath stringByAppendingPathComponent:@"a.png"];

            [imageData writeToFile:filePath atomically:YES];

  • 相关阅读:
    Vue
    Vue
    Vue
    Vue
    Vue
    kubernetes
    kubernetes
    kubernetes
    django源码bug解决方案
    UNI-APP 桌面LOGO角标设置(ios)
  • 原文地址:https://www.cnblogs.com/yangmx/p/4110109.html
Copyright © 2011-2022 走看看