Ios 如何为我的SexyTooltip实例定义允许的箭头方向?
根据文档,我将使用typedef为SexyTooltip指定一个箭头方向数组 他们建议:Ios 如何为我的SexyTooltip实例定义允许的箭头方向?,ios,objective-c,typedef,nsenumerator,Ios,Objective C,Typedef,Nsenumerator,根据文档,我将使用typedef为SexyTooltip指定一个箭头方向数组 他们建议: typedef NS_ENUM(NSUInteger, SexyTooltipArrowDirection) { SexyTooltipArrowDirectionUp, SexyTooltipArrowDirectionDown, SexyTooltipArrowDirectionLeft, SexyTooltipArrowDirectionRight }; 我对什么是t
typedef NS_ENUM(NSUInteger, SexyTooltipArrowDirection) {
SexyTooltipArrowDirectionUp,
SexyTooltipArrowDirectionDown,
SexyTooltipArrowDirectionLeft,
SexyTooltipArrowDirectionRight
};
我对什么是typedef以及定义后如何使用它感到困惑。如何实现文档中所述的功能?SexyTooltip.h中有一个示例: 您不创建问题中显示的枚举,该枚举已提供给您
SexyTooltip *tooltip = [[SexyTooltip alloc] initWithView:self.instructionsView];
tooltip.permittedArrowDirections = @[@(SexyTooltipArrowDirectionDown), @(SexyTooltipArrowDirectionUp)];