I´m trying to check if the device is an iPhone or an iPad and it´s working. I´m just checking with:
But I want to use this for setting some different int values so different things location is costume to what ever device they are using. But my values in this example aren´t beeing set... So all locations equals 0 when I run it and everything ends up in one spot...
This if statment is located in my
method.
Code:
if (UI_USER_INTERFACE_IDIOM() == UIUserInterfaceIdiomPad){ NSLog(@"its an iPad");
}
Code:
else if (UI_USER_INTERFACE_IDIOM() == UIUserInterfaceIdiomPhone){
NSLog(@"its an iPhone");
yCord = 70;
xCord = 20;
}
Code:
-(id)initWithSize:(CGSize)size