Conditional Compilation seems to be not working in Xamarin Studio

KoushikSarkar.6410KoushikSarkar.6410 USMember ✭✭

I created a Forms app.
In the code behind for my page I have

        #if __IOS__
        this.MyLabel.BackgroundColor = Color.Navy;

In my ios project options I can see IOS in the "Compiler" tab. (please see screenshot)

But when I run in IOS it doesn't make the label blue.

But if I remove #if IOS block
it makes the label blue.

Please see screenshots.

Any idea what I missed. (I'm on XS. Haven't tried on Visual Studio)

Best Answer


Sign In or Register to comment.