iphone - CLViewController, display detail view in fullscreen, iOS sdk -
i working on ios application , have used split view structure facebook application has.
i have used code has clviewcontroller, code have found google.
all working fine in current application when app loads first screen shows split view in 80% screen shows menu , 20% shows detail page. want change in way facebook app works. in facebook on loading app directly shows news feed. same way want load detail page first.
if have idea how can achieve please share.
thanks in advance.
code : how use swrevealviewcontroller
here first initialize view controllers
firstviewcontroller * first = [[firstviewcontroller alloc]init]; secondviewcontroller * second = [[secondviewcontroller alloc]init];
create barbutton....
uibarbuttonitem *revealbutton = [[uibarbuttonitem alloc] initwithimage:[uiimage imagenamed:@"reveal-icon"] style:uibarbuttonitemstyleplain target:_revealvc action:@selector(revealtoggleanimated:)];
put firstviewcontroller , secondviewcontroller navigation first hide self.navigationbar self.navigationcontroller.navigationbarhidden = yes;
uinavigationcontroller * navigationcontroller1 = [[uinavigationcontroller alloc] initwithrootviewcontroller:first]; navigationcontroller.navigationbar.topitem.leftbarbuttonitem = revealbutton uinavigationcontroller * navigationcontroller2 = [[uinavigationcontroller alloc] initwithrootviewcontroller:second]; navigationcontroller.navigationbar.topitem.leftbarbuttonitem = revealbutton
initialize swrevealviewcontroller
_revealvc= [[swrevealviewcontroller alloc]initwithrearviewcontroller:navigationcontroller1 frontviewcontroller:navigationcontroller2]; _revealvc.rightviewcontroller =nil; _revealvc.rearviewrevealwidth = 60; _revealvc.rearviewrevealoverdraw = 0; _revealvc.bouncebackonoverdraw = yes; _revealvc.stabledragonoverdraw = yes; _revealvc.rightviewrevealwidth = 350; _revealvc.rightviewrevealoverdraw = 0; [_revealvc setfrontviewposition:frontviewpositionright]; [_revealvc revealtoggleanimated:yes]; [self.navigationcontroller setviewcontrollers:[nsarray arraywithobject:_revealvc] animated:true];
hope you
Comments
Post a Comment