2012-02-20 10 views

答えて

3
NSTimer *t = [NSTimer scheduledTimerWithTimeInterval: 3 
                 target: self 
                selector:@selector(showSuperView) 
                userInfo: nil repeats:NO]; 

あなたがchildviewのスーパーを表示したい場合は、

-(void)showSuperView 
{ 
[childView superview].hidden = NO; 
} 

、あなたはスーパーのchildViewを表示したい場合は、その後

-(void)showchildView 
    { 
    for([UiView* v in superview.subviews]) 
{ 
//implement the condition to identify concerned childView 
v.hidden = NO; 
} 
    } 
1
NSDate *current=[[[NSDate alloc] init] autorelease]; 
NSTimer *timer=[[NSTimer alloc] initWithFireDate:current interval:3.0 target:self selector:@selector(gotoNextView) userInfo:nil repeats:NO]autoreleas]; 

- (IBAction) gotoNextView 
{ 
    yourNextView *obj=[[[yourNextView alloc] initWithNibName:@"yourNextView" bundle:nil]autorelease]; 
    [self.navigationController pushViewController:obj animated:YES]; 
} 

希望これは便利!:)

関連する問題