Advertise Mobile SDKs Books Events Forum News Social Networking Support Us
Follow @iphonedevsdk on Twitter

Interface 2, Advanced iOS
Mockup & Code Gen
($9.99)

Make your own iPhone apps
and run them live!
(free)

Pic Frame Dynamo: Photo Editing
($0.99)

Abiliator
($1.99)

Want your application or service advertised on iPhone Dev SDK?

Go Back   iPhone Dev SDK Forum

View Single Post
Old 04-26-2009, 06:27 AM   #1 (permalink)
DGYWFT
New Member
 
Join Date: Feb 2009
Location: Bangkok
Posts: 145
DGYWFT is on a distinguished road
Default Fade out Navigationbar?

I am trying to fade out the Navigation bar from my UIScrollView subclass. It calls the viewcontroller to fade this bar out, and it runs (nslogs show) but it does not fade out. But if I put the fadeout method on the viewcontroller viewdidload the fadeout works. Any ideas why it doesn't want to fade out if scrollview calls it?

scrollview.m

Code:
#import "ScrollView.h"
#import "DetailViewController.h"


@implementation ScrollView


- (void) touchesEnded: (NSSet *) touches withEvent: (UIEvent *) event {
	
	if (!self.dragging) {
		[self.nextResponder touchesEnded: touches withEvent:event]; 
	}		
	[super touchesEnded: touches withEvent: event];
}


- (void)touchesBegan:(NSSet *)touches withEvent:(UIEvent *)event { 
    NSLog(@"Touched!");
	DetailViewController *dvc = [[DetailViewController alloc] init];
	[dvc performSelector:@selector(fadeBarAway) withObject:nil afterDelay:1.0];
} 


- (void)dealloc {
	[super dealloc];
}


@end
viewcontroller:
Code:
- (void)fadeBarAway {
	NSLog(@"hey fader!");
	[UIView beginAnimations:nil context:NULL];
	[UIView setAnimationDuration:0.5];
	self.navigationController.navigationBar.alpha = 0.0;
	[UIView commitAnimations];
}
DGYWFT is offline   Reply With Quote
 

» Advertisements
» Online Users: 450
17 members and 433 guests
apatsufas, CatfishBlues Games, ChrisYates, Duncan C, gogoman, ipodphone, Kieren Harrold, LegionMD, mer10, milanalina, PavelMik, Robemtims, sacha1996, solie, themartist, VinceYuan, yiliorey
Most users ever online was 1,387, 04-10-2012 at 04:21 AM.
» Stats
Members: 175,622
Threads: 94,087
Posts: 402,801
Top Poster: BrianSlick (7,990)
Welcome to our newest member, yiliorey
Powered by vBadvanced CMPS v3.1.0

All times are GMT -5. The time now is 07:04 AM.
Powered by vBulletin® Version 3.8.0
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.