iBug iBug - 3 months ago 7x
iOS Question

Manage single screen for two targets iOS

I have an app with two targets. Both targets are sharing some resources and some resources are different.

Everything is fine until, I have a screen where I ask user for some info i.e. his date of birth, but it is not required in other target.

So how I can manage it that if user is using app with target1, he will not see date of birth text field but when user is using with target2, app will ask for date of birth.

I am using preprocessors in my

to determine which target is used.


You can set flag value and using this you can hide your view in coding part.

        [self.textField setHidden:YES];
        //DO what ever you want