で2 uiimageViewを置く私のコードです:は、ここで背景
-(void)transition{
CATransition *applicationLoadViewIn = [CATransition animation];
[applicationLoadViewIn setDuration:2];
[applicationLoadViewIn setType:kCATransitionFade];
[applicationLoadViewIn setTimingFunction:[CAMediaTimingFunction functionWithName:kCAMediaTimingFunctionEaseIn]];
[[self.view layer] addAnimation:applicationLoadViewIn forKey:kCATransitionFade];
imgView2 = [[UIImageView alloc] initWithImage:[UIImage imageNamed:@"bluefont.png"]];
if(self.view.layer.sublayers.count<=2)
{
[[[self view] layer] addSublayer:[imgView2 layer]];
}
else {
[[self.view.layer.sublayers lastObject] removeFromSuperlayer];
}
[imgView2 release];
}
- (void)viewDidLoad {
[super viewDidLoad];
imgView = [[UIImageView alloc] initWithImage:[UIImage imageNamed:@"pinkfont.png"]];
[[[self view] layer] addSublayer:[imgView layer]];
[imgView release];
[NSTimer scheduledTimerWithTimeInterval:5.0 target:self selector:@selector(transition) userInfo:nil repeats:YES];
}
私は、このように背景が青とピンクのcolour.Howの間で変更され、背景にimgView2とimgViewを送りたいです私はこれをしてもらえますか?申し訳ありませんが私の英語のために、私はフランス人だ:/
コードで説明できるのか分かりませんか? –
誰でも私に返答できますか? –
image1.frame = cgrectmake(0,0,320,160); image2.frame = cgrectmake(0,160,320,160); – Tendulkar