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 > iPhone SDK Development Forums > iPhone SDK Development

Reply
 
LinkBack Thread Tools Display Modes
Old 09-19-2010, 04:59 AM   #1 (permalink)
Registered Member
 
TrueScot's Avatar
 
Join Date: Oct 2009
Posts: 48
TrueScot is on a distinguished road
Default PageCurlUp in a Tab Bar Item

I have a three item Tab Bar which works fine. On occasion I need to switch to a view not from the Tab Bar item but via an IBAction (button press) instead. Again this works fine with [self.tabBarController setSelectedIndex:1]; I want to switch to this view however with a PageCurlUp transition effect. I use this to do it:

EstimateController *estimateView = [[EstimateController alloc] initWithNibName:@"EstimateController" bundle:nil];
[UIView beginAnimations:nil context:NULL];
[UIView setAnimationDuration:1];
[UIView setAnimationTransition:UIViewAnimationTransitionCu rlUp forView:self.view cache:YES];
[self.view addSubview:estimateView.view];
[UIView commitAnimations];

This works fine except, it disables the Tab Bar item view controller where the IBAction (UIButton) is used to change the view. To get around this I have tried to combine both techniques (I know it's not the most elegant way but I can't find another .... unless you know different). So I have this:

EstimateController *estimateView = [[EstimateController alloc] initWithNibName:@"EstimateController" bundle:nil];
[UIView beginAnimations:nil context:NULL];
[UIView setAnimationDuration:1];
[UIView setAnimationTransition:UIViewAnimationTransitionCu rlUp forView:self.view cache:YES];
[self.view addSubview:estimateView.view];
[UIView commitAnimations];
[self.tabBarController setSelectedIndex:1];

to change the view with a PageCurlUp transition followed immediately by a change view - to the same view - using the setSelectedIndex to reposition the Tab Bar item.

This doesn't work and I don't know why. Any ideas on how to get this to work or a better way of doing it?

Last edited by TrueScot; 09-19-2010 at 05:03 AM.
TrueScot is offline   Reply With Quote
Reply

Bookmarks

Tags
sdk 4.1, tab bar problem, transition, view controller control

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: 306
15 members and 291 guests
2ndSegment, cayladv57, cgokey, dermotos, djohnson, Domele, Hamad, heshiming, linkmx, markuschow, pungs, Sloshmonster, teebee74, v1n2e7t
Most users ever online was 1,387, 04-10-2012 at 04:21 AM.
» Stats
Members: 175,655
Threads: 94,116
Posts: 402,889
Top Poster: BrianSlick (7,990)
Welcome to our newest member, pungs
Powered by vBadvanced CMPS v3.1.0

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