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 12-01-2010, 08:10 AM   #1 (permalink)
Registered Member
 
Join Date: Mar 2010
Posts: 6
Toliver182 is on a distinguished road
Default £5 paypal for help: Switching UIViews within one tab of a TabBar Application

Hi All

ok here is my applications setup:
Two xib's

MainWindow.xib
NewsletterView.xib


Set up as follows:
MainWindow.xib
Files owner
First Responder
The Delegate
Window
Tab Bar Controller--setup to load tabs from .xib's
Two tabs -Newsletter
-Map

I'm not concerned about the Map tab.

Within the NewsletterView.xib ( i do have the .h and .m files setup)

Files owner set up with class NewsletterViewController via interface builder.
First Responder
and Two views:
View- setup as NewsSignUpView via IBOutlet - this is the first view that loads on the selected tab.
View - setup as NewsReaderView via IBOutlet


I want to be able to click a button (assigned via IBAction) on NewsSignUpView the flip horizontally to reveal NewsReaderView.


This is what i have so far:

Code:
    -(IBAction) revealNewsReaderView 
    {CGContextRef context = UIGraphicsGetCurrentContext();
    [UIView beginAnimations:nil context:context];
    [UIView setAnimationTransition: UIViewAnimationTransitionFlipFromLeft forView:newsSignUpView cache:YES];
    [UIView setAnimationCurve:UIViewAnimationCurveEaseInOut];
    [UIView setAnimationDuration:1.0];	
    [self.view exchangeSubviewAtIndex:0 withSubviewAtIndex:1];
    [UIView commitAnimations];
    }
This Flips the view but doesn't change the view shown.


Can anyone provide some code, or point out where im going wrong?

Thanks in advance.

Last edited by Toliver182; 12-01-2010 at 09:05 AM.
Toliver182 is offline   Reply With Quote
Reply

Bookmarks

Tags
animation, iboutlet, switch, tabbar, uiview

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: 369
6 members and 363 guests
daudrizek, HemiMG, Kirkout, MarkC, Sami Gh
Most users ever online was 1,387, 04-10-2012 at 04:21 AM.
» Stats
Members: 175,665
Threads: 94,120
Posts: 402,898
Top Poster: BrianSlick (7,990)
Welcome to our newest member, daudrizek
Powered by vBadvanced CMPS v3.1.0

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