【发布时间】:2016-12-29 10:28:37
【问题描述】:
我正在尝试找出使用托管在网络上的图像创建 MSStickers 的方法。我可以使用本地图像创建 MSStickers,例如:
NSString *imagePath = [[NSBundle mainBundle] pathForResource: @"image_name"
ofType: @"png"];
NSURL *imageURL = [NSURL fileURLWithPath: urlString];
MSSticker *sticker = [[MSSticker alloc] initWithContentsOfFileURL: stickerURL
localizedDescription: @"my-sticker"
error: &err];
但我不能这样做:
NSString *imageURLString = @"https://my-cdn/my-sticker.png";
NSURL *imageURL = [NSURL urlWithString: urlString];
MSSticker *sticker = [[MSSticker alloc] initWithContentsOfFileURL: stickerURL
localizedDescription: @"my-sticker"
error: &err];
【问题讨论】:
标签: ios objective-c ios10 imessage