Delphi + iOS:如何将此代码转换为Delphi?

时间:2019-05-29 04:43:49

标签: ios delphi firemonkey

我尝试将FBAudienceNetwork.framework的标头转换为Delphi

typedef NS_ENUM(NSUInteger, FBNativeAdViewTag) {
    FBNativeAdViewTagIcon = 5,
    FBNativeAdViewTagTitle,
    FBNativeAdViewTagCoverImage,
    FBNativeAdViewTagSubtitle,
    FBNativeAdViewTagBody,
    FBNativeAdViewTagCallToAction,
    FBNativeAdViewTagSocialContext,
    FBNativeAdViewTagChoicesIcon,
    FBNativeAdViewTagMedia,
};

/**
 Use this category to set tags for views you are using for native ad.
 This will enable better analytics.
 */
@interface UIView (FBNativeAdViewTag)
@property (nonatomic, assign) FBNativeAdViewTag nativeAdViewTag;
@end

Delphi代码

const
  FBNativeAdViewTagIcon = 5;
  FBNativeAdViewTagTitle = 6;
  FBNativeAdViewTagCoverImage = 7;
  FBNativeAdViewTagSubtitle = 8;
  FBNativeAdViewTagBody = 9;
  FBNativeAdViewTagCallToAction = 10;
  FBNativeAdViewTagSocialContext = 11;
  FBNativeAdViewTagChoicesIcon = 12;
  FBNativeAdViewTagMedia = 13;

type

FBNativeAdViewTag = NSUInteger;

FBNativeAdViewTag = interface(IObjectiveC)
    ['{F87149BD-3905-4566-B5B0-85F2C5ABB121}']
    procedure setNativeAdViewTag(nativeAdViewTag: FBNativeAdViewTag); cdecl;
    function nativeAdViewTag: FBNativeAdViewTag; cdecl;
  end;

我收到错误消息:

  

标识符重新声明了“ FBNativeAdViewTag”

如何将此代码转换为Delphi?

0 个答案:

没有答案