0
UIAlertView를 화면 중앙의 기본 위치에서 맨 위로 이동하려고합니다. 나는 아래의 코드를 사용하고 있으며 iOS 4에서 작동하지만 3으로 이동하지는 않습니다.
누구든지 어떤 생각을 가지고 있습니까?CIAffineTransformTranslate가 iOS 3.1.3에서 작동하지 않습니다.
UIAlertView *newSubscriptionAlertView = [[UIAlertView alloc] initWithTitle:@"Ndrysho abonimin" message:@" " delegate:self cancelButtonTitle:@"Anullo" otherButtonTitles:@"Ruaj", nil]; subscriptionNameField = [[UITextField alloc] initWithFrame:CGRectMake(12.0, 45.0, 260.0, 22.0)]; subscriptionNameField.text = [[subscriptions objectAtIndex:changeCode] title]; subscriptionNameField.autocorrectionType = UITextAutocorrectionTypeNo; subscriptionNameField.autocapitalizationType = UITextAutocapitalizationTypeNone; [subscriptionNameField setBackgroundColor:[UIColor whiteColor]]; [newSubscriptionAlertView addSubview:subscriptionNameField]; [subscriptionNameField becomeFirstResponder]; [subscriptionNameField release]; CGAffineTransform moveUp = CGAffineTransformTranslate(newSubscriptionAlertView.transform, 0.0, 0.0); [newSubscriptionAlertView setTransform:moveUp]; [newSubscriptionAlertView show]; [newSubscriptionAlertView release];
(someTransform, 0, 0)'단지로 다시'돌아 someTransform' 것입니다 당신. –
이고 setTransform 메서드가 아래 한 행에 사용되는 이유입니다. 나는 iOS 4.0 이상에서 작동하기 때문에 문법은 괜찮다고 생각한다. – Olsi
비록 내가 이렇게하면 : newSubscriptionAlertView.transform = CGAffineTransformTranslate (newSubscriptionAlertView.transform, 0.0, 0.0); 나는 같은 문제를 가지고있다. 의미는 4에서 작동하지만 3에서 작동하지 않습니다. ( – Olsi