ios


How to dismiss modal ViewController from right to left?


In Objective-C, I want to dismiss modal ViewController from right to left.
Now I can move from left to right on modal.
But I don't know how to dismiss this modal VC from left to right like push screen transition.
Here is code which move from aViewController to bViewController.
bViewController *nextVC = [[bViewController alloc] initWithNibName:nil bundle:nil];
CATransition *transition = [CATransition animation];
transition.duration = 0.5;
transition.timingFunction = [CAMediaTimingFunction functionWithName:kCAMediaTimingFunctionLinear];
transition.type = kCATransitionPush ;
[transition setSubtype:kCATransitionFromLeft];
[[nextVC.view layer] addAnimation:transition forKey:#"TransitionTest"];
//[self presentViewController:nextVC animated:YES completion:nil];
//if it's possible, I want to use upside's cord.(don't addSubView) but I don't know how to do it)
[self.view addSubview:nextVC.view] ;
CATransition *transition = [CATransition animation];
transition.duration = 0.4;
transition.timingFunction = [CAMediaTimingFunction functionWithName:kCAMediaTimingFunctionEaseInEaseOut];
transition.type = kCATransitionPush;
transition.subtype = kCATransitionFromRight;
[self.view.window.layer addAnimation:transition forKey:nil];
[self dismissViewControllerAnimated:NO completion:nil];
-(void) dismiss {
CATransition *transition = [CATransition animation];
transition.duration = 0.5;
transition.timingFunction =
[CAMediaTimingFunction functionWithName:kCAMediaTimingFunctionLinear];
transition.type = kCATransitionMoveIn;
transition.subtype = kCATransitionFromRight;
UIView *containerView = self.view.window;
[containerView.layer addAnimation:transition forKey:nil];
[self dismissModalViewControllerAnimated:NO];
}

Related Links

How to install root certificate inside iOS app, so it will be trusted when open URL from UIWebView?
JSon and Ambiguos use of subscript
get remote push notification message in background in iOS
Why can't I bold just part of a string in Swift with NSMutableString?
Swift - WebView doesn't detect swipes when loading
Interstitial DFP ad doesn't fill the screen
Q:UITableView scrollview delegate method did not pass the special code
ios Xcode storyboard compact not working
iOS - Where is object stored in application NSUserDefault? [duplicate]
UIImage to NSData fatal error: unexpectedly found nil while unwrapping an Optional value
How to load images for UITableView or UICollectionView from cache everytime
iOS - UITableview cells with shared surface
Xcode fix memory problems
UIWebview remove padding / margin
How do I not get optional in the output?
Material Select blinking on iOS

Categories

HOME
amazon-s3
performance
groovy
xaml
runnable
auth0
robotframework
jsessionid
localforage
gluon
c++14
android-bluetooth
google-analytics-api
jfreechart
stm
cross-compiling
sqlconnection
group-by
apex
apache-kafka-streams
next
round-robin
orientdb-2.1
gitlab-ci-runner
exe4j
co
datamatrix
ibm-datapower
azure-ad-graph-api
mouseevent
jqplot
background-subtraction
scalability
iar
angular-ngmodel
flatbuffers
coqide
debugview
json-c
stomp
pyparsing
machine-language
sieve-of-eratosthenes
executorservice
docker-image
runge-kutta
sagepay
worldpay
angular2-seed
keyboard-maestro
invalidate
openwebanalytics
requirements-management
multisite
fido
itertools
angular-directive
iseries-navigator
cabal-install
jsbin
amazon-dynamodb-streams
facebook-audience-network
webclient-download
cufft
android-number-picker
pager
dms
webpack-hmr
actioncable
android-listfragment
realm-list
keypad
alienvault
wintersmith
antiforgerytoken
min3d
java-client
puppet-enterprise
gcovr
jasmin
httpservice
first-class-functions
syndication-feed
ituneslibrary
jqgrid-php
sonata-media-bundle
data-dictionary
blueprint
appstore-sandbox
emitmapper
webcal
route-me
icon-fonts
layout-manager
haar-wavelet
mixing
51degrees
documentviewer
rgba
media-manager
proxy-classes
settings.bundle
jdic
network-scan
xquery-update

Resources

Mobile Apps Dev
Database Users
javascript
java
csharp
php
android
MS Developer
developer works
python
ios
c
html
jquery
RDBMS discuss
Cloud Virtualization
Database Dev&Adm
javascript
java
csharp
php
python
android
jquery
ruby
ios
html
Mobile App
Mobile App
Mobile App