저는 앱에서 모든 기능을 최소화하려고 노력했지만 실제로이 기능을 향상시키는 방법을 찾을 수 없습니다. 어쩌면 누군가가 저보다 훨씬 낫지 않을까요? :)이 스 니펫을 더 예쁘게/좋게/줄이게 만들려면 어떻게해야합니까?
-(void)showRivBoxWithAnimtation:(BOOL)yesno {
if(yesno) {
[UIView beginAnimations:nil context:NULL];
[UIView setAnimationDuration:0.2];
if ([self alpha] > 0) {
[self setAlpha:0.0];
[appDelegate.JSONparser setDelegate:self.delegate]; //Give back the JSONparser to the parent!
} else {
[self setAlpha:1.0];
}
[UIView setAnimationDelegate:self];
[UIView setAnimationDidStopSelector:@selector(clearRivBoxContent:finished:context:)];
[UIView commitAnimations];
} else {
if ([self alpha] > 0) {
[self setAlpha:0.0];
[appDelegate.JSONparser setDelegate:self.delegate]; //Give back the JSONparser to the parent!
} else {
[self setAlpha:1.0];
}
}
}
이 http://codereview.stackexchange.com에 속한다? –