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

Mockup & CodeGen, iPhone & iPad
($9.99)

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

Manu
($0.99)

Want your application or service advertised on iPhone Dev SDK?

Go Back   iPhone Dev SDK Forum > iPhone SDK Development Forums > iPhone SDK Development

Reply
 
LinkBack Thread Tools Display Modes
Old 04-26-2009, 07:27 AM   #1 (permalink)
New Member
 
Join Date: Feb 2009
Location: Bangkok
Posts: 145
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
Old 04-26-2009, 12:07 PM   #2 (permalink)
Registered Member
iPhone Dev SDK Supporter
 
Join Date: Oct 2008
Posts: 10
Default

Is "DetailViewController" a UIViewController or a UINavigationController?
brandon0104 is offline   Reply With Quote
Old 04-26-2009, 12:41 PM   #3 (permalink)
New Member
 
Join Date: Feb 2009
Location: Bangkok
Posts: 145
Default

UIViewController is a UIViewController.

If I have a button in that class that calls the method, it works. But when I call it from this scrollview subclass it runs, completes but the bar never fades away.
DGYWFT is offline   Reply With Quote
Old 04-27-2009, 04:13 AM   #4 (permalink)
New Member
 
Join Date: Feb 2009
Location: Bangkok
Posts: 145
Default

anyone?
DGYWFT is offline   Reply With Quote
Old 04-29-2009, 07:58 PM   #5 (permalink)
New Member
 
Join Date: Feb 2009
Location: Bangkok
Posts: 145
Default

One last bump, anyone?
DGYWFT is offline   Reply With Quote
Reply

Bookmarks

Tags
fade, scrollview, viewcontroller

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



» Advertisements
» Online Users: 352
22 members and 330 guests
ADY, Dani77, Duncan C, e2applets, HemiMG, Herbie, JasonR, keeshux, linkmx, macquitzon216, mer10, Monstertaco, piesia, prchn4christ, Promo Dispenser, Robiwan, sebasx, sly24, Touchmint, twerner, zulfishah
Most users ever online was 1,187, 10-11-2011 at 08:09 AM.
» Stats
Members: 158,881
Threads: 89,228
Posts: 380,760
Top Poster: BrianSlick (7,129)
Welcome to our newest member, macquitzon216
Powered by vBadvanced CMPS v3.1.0

All times are GMT -5. The time now is 01:36 PM.
Powered by vBulletin® Version 3.8.0
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.3.0