Markus
Markus

Reputation: 598

Conditional compiler flag to detect storyboard in Xcode?

How can you detect if you are in storyboard mode using conditional compiling?

Background: I want to display a static image instead of dynamic one for the storyboard view. I stumbled over an article on how to do that a while ago (so I know it's possible) but I can't find that anymore.

It's something similar to this:

#if storyboard
 statements
#else
 statements
#endif

Any advice?

Upvotes: 1

Views: 537

Answers (1)

jtbandes
jtbandes

Reputation: 118731

I believe you are looking for TARGET_INTERFACE_BUILDER or prepareForInterfaceBuilder, as described here.

Upvotes: 2

Related Questions