xcode - Tab Bar Controller- switch UIView within one tab -
ok here applications setup: 2 xib's
mainwindow.xib newsletterview.xib
set follows: mainwindow.xib files owner first responder delegate window tab bar controller--setup load tabs .xib's 2 tabs -newsletter -map
i'm not concerned map tab.
within newsletterview.xib ( have .h , .m files setup)
files owner set class newsletterviewcontroller via interface builder.
first responder
, 2 views:
view- setup newssignupview via iboutlet - first view loads on selected tab.
view - setup newsreaderview via iboutlet
i want able click button (assigned via ibaction) on newssignupview flip horizontally reveal newsreaderview.
this have far:
-(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 view doesn't change view shown.
can provide code, or point out im going wrong?
thanks in advance.
you can download apple's sample see implementation of flipping between 2 views in same frame. http://developer.apple.com/library/ios/#samplecode/uicatalog/introduction/intro.html
Comments
Post a Comment