How do I define permitted arrow directions for my instance of SexyTooltip?

158 views Asked by At

According to the documentation here I am to specify an array of my arrow directions for SexyTooltip using a typedef.

They suggest:

typedef NS_ENUM(NSUInteger, SexyTooltipArrowDirection) {
    SexyTooltipArrowDirectionUp,
    SexyTooltipArrowDirectionDown,
    SexyTooltipArrowDirectionLeft,
    SexyTooltipArrowDirectionRight
};

I'm confused about what a typedef is and how I would use it after I define it. How would I implement this as described in the documentation?

1

There are 1 answers

0
rmaddy On BEST ANSWER

There is an example in the SexyTooltip.h:

SexyTooltip *tooltip = [[SexyTooltip alloc] initWithView:self.instructionsView];
tooltip.permittedArrowDirections = @[@(SexyTooltipArrowDirectionDown), @(SexyTooltipArrowDirectionUp)];

You do not create the enum shown in your question, that is already provided for you.