In diesem Script bekommen Objekte statische Koordinaten.
Das Problem ist, dass ich nicht weiß wie ich folgendes Problem lösen kann: Das Erkennen zwischen iPhone4/iPhone5/iPhone6/iPhone6 Plus, also das jedes Device eigene Koordinaten bekommt.
- (void)willAnimateRotationToInterfaceOrientation:
(UIInterfaceOrientation)toInterfaceOrientation
duration:(NSTimeInterval)duration
{
if (toInterfaceOrientation == UIInterfaceOrientationLandscapeLeft
toInterfaceOrientation == UIInterfaceOrientationLandscapeRight)
{
eins.frame = CGRectMake(20, 70, 115, 115);
zwei.frame = CGRectMake(250, 70, 115, 115);
drei.frame = CGRectMake(522, 70, 115, 115);
vier.frame = CGRectMake(20, 230, 115, 115);
fuenf.frame = CGRectMake(250, 230, 115, 115);
sechs.frame = CGRectMake(522, 230, 115, 115);
}
else
{
eins.frame = CGRectMake(30, 90, 115, 115);
zwei.frame = CGRectMake(250, 90, 115, 115);
drei.frame = CGRectMake(30, 300, 115, 115);
vier.frame = CGRectMake(250, 300, 115, 115);
fuenf.frame = CGRectMake(30, 530, 115, 115);
sechs.frame = CGRectMake(250, 530, 115, 115);
}
}
Das Problem ist, dass ich nicht weiß wie ich folgendes Problem lösen kann: Das Erkennen zwischen iPhone4/iPhone5/iPhone6/iPhone6 Plus, also das jedes Device eigene Koordinaten bekommt.
- (void)willAnimateRotationToInterfaceOrientation:
(UIInterfaceOrientation)toInterfaceOrientation
duration:(NSTimeInterval)duration
{
if (toInterfaceOrientation == UIInterfaceOrientationLandscapeLeft
toInterfaceOrientation == UIInterfaceOrientationLandscapeRight)
{
eins.frame = CGRectMake(20, 70, 115, 115);
zwei.frame = CGRectMake(250, 70, 115, 115);
drei.frame = CGRectMake(522, 70, 115, 115);
vier.frame = CGRectMake(20, 230, 115, 115);
fuenf.frame = CGRectMake(250, 230, 115, 115);
sechs.frame = CGRectMake(522, 230, 115, 115);
}
else
{
eins.frame = CGRectMake(30, 90, 115, 115);
zwei.frame = CGRectMake(250, 90, 115, 115);
drei.frame = CGRectMake(30, 300, 115, 115);
vier.frame = CGRectMake(250, 300, 115, 115);
fuenf.frame = CGRectMake(30, 530, 115, 115);
sechs.frame = CGRectMake(250, 530, 115, 115);
}
}