分享到 :

QQApiURLObject

用于分享URL地址所指向的目标类型的对象基类。

  • 父类

QQApiObject

  • 初始化方法
-(id)initWithURL:(NSURL*)url
title:(NSString*)title
description:(NSString*)description
previewImageData:(NSData*)data
targetContentType:(QQApiURLTargetType)targetContentType;
-(id)initWithURL:(NSURL*)url
title:(NSString*)title
description: (NSString*)description
previewImageURL : (NSURL*) previewURL
targetContentType: (QQApiURLTargetType) targetContentType;
  • 工厂方法
+(id)objectWithURL :(NSURL*)url
title:(NSString*)title
description:(NSString*)description
previewImageData:(NSData*)data
targetContentType:(QQApiURLTargetType)targetContentType;
+(id)objectWithURL :(NSURL*)url
title:(NSString*)title
description:(NSString*)description
previewImageURL :(NSURL*)previewURL
targetContentType:(QQApiURLTargetType)targetContentType;
  • 属性说明
参数类型含义
urlNSURLURL地址,必填,最长512字符
previewImageURLNSURL预览图像URL **预览图像数据与预览图像URL可二选一
previewImageDataNSData预览图像数据,最大1M字节
targetContentTypeQQApiURLTargetTypeURL地址所指向的目标类型.

其中,targetContentType的类型为枚举类型QQApiURLTargetType,有如下四种值:

QQApiURLTargetType含义
QQApiURLTargetTypeNotSpecified未指定类型
QQApiURLTargetTypeAudio音频类型
QQApiURLTargetTypeVideo视频类型
QQApiURLTargetTypeNews新闻类型

返回顶部