Saturday, 15 June 2013

objective c - Changing different views in Xcode 6 os x application using Storyboards -



objective c - Changing different views in Xcode 6 os x application using Storyboards -

i'm checking out new xcode 6 storyboards os x application

i want same when doing force segue in ios side.

but new xcode storyboards os x application doesn't have force segue.

so can see there no push. how achive same functionality?

i haven't tested it, i've used similar approach on ipad app. needs tailoring cocoa:

-(void) perform { uiview *source = ((uiviewcontroller *)self.sourceviewcontroller).view; uiview *destination = ((uiviewcontroller *)self.destinationviewcontroller).view; uiwindow *window = [[[uiapplication sharedapplication] delegate] window]; destination.center = cgpointmake(source.center.x + source.frame.size.width, destination.center.y); [window insertsubview:destination abovesubview:source]; [uiview animatewithduration:0.4 animations:^{ destination.center = cgpointmake(source.center.x, destination.center.y); source.center = cgpointmake(0- source.center.x, destination.center.y);} completion:^(bool finished){ [source removefromsuperview]; window.rootviewcontroller = self.destinationviewcontroller; }]; }

let me know if works.

objective-c xcode cocoa swift xcode6

No comments:

Post a Comment