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

Google Maps SDK on older iOS Versions
kSecAttrAccessibleAlways deprecated in ios 9
Remote image size in swift
Problems resizing UICollectionView
Set a variable for the audiofile in AVAudioPlayer / Swift
Meteor app: Difference Between Uploading Images from Iphone than Computer?
NodeJS(SocketIO) authentication token
When writing to text file (appending) the last value I write replaces all previous values
How to use WebP image in UIImageView Swift
How to get rid of the glitch that occurs right after pressing the back button?
Distance between two UIButtons according to screen size? [closed]
Creating ssl public and private key pair in ios app
How to Renaming a Project or App in XCode? [duplicate]
ios - how to have Multiple lines of NSAttributedString
Granting permission for the calendar without showing ios builtIn alertView
iOS JSON Parsing, Format Issues

Categories

HOME
odoo-10
vb.net
copy
spring-roo
applet
visual-studio-2012
wso2is
jasypt
android-dialer
identifier
condor
python-2.5
atg
sencha-touch-2
ibm-datapower
jsgrid
symbolic-math
padding
code-signing
ucwa
reformatting
swipe
cloudinary
webcenter
aem-6
data-science
json-rpc
uistoryboardsegue
eve
consistency
tern
hostname
maven-jetty-plugin
distributed-lock
zuul
ewsjavaapi
simplesamlphp
multistore
smartbanner
multisite
jquery-masonry
okular
laravel-routing
abbyy
fasta
cmsmadesimple
agile-processes
perspective
mit-scheme
visual-build-professional
uiswitch
docklight
yapdatabase
flexigrid
wgs84
domo
autopy
sample-data
spymemcached
telescope
cbc-mode
alienvault
gcovr
servlet-listeners
brooklyn
iphone-privateapi
monk
spread-toolkit
cellular-automata
custom-titlebar
xsltforms
disk-io
ioerror
nsimageview
globbing
loadlibrary
word-2010
shebang
pixelsense
domain-mapping
rpn
ad-hoc-distribution
f2c
pastebin
polyglot
wmd
eclipse-tptp
versant-vod
corporate-policy
roguelike

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