Delphi + iOS : How to translate this code to Delphi?

  

I try to translate header of FBAudienceNetwork.framework to 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 code

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;

I get error:

Identifier redeclared ‘FBNativeAdViewTag’

How to translate this code to Delphi?

Comments are closed.