iOS - save image in jpg format

前端 未结 2 1856
不知归路
不知归路 2021-01-18 20:09

My question is what format the image is saved, if is dat or jpg. This is the code that i used:

    NSString * urlImage = .....;
    NSString * _folderPath =          


        
2条回答
  •  予麋鹿
    予麋鹿 (楼主)
    2021-01-18 20:16

    You should use

    stringByAppendingPathComponent method to create or get exact valid path

    Use this way:

        NSString * jpegPath = [_folderPath stringByAppendingPathComponent:imageName];// [NSString stringWithFormat:@"%@%@",_folderPath,imageName];
    

提交回复
热议问题