ios


performSegueWithIdentifier Firing, But Not Displaying


Very sorry for adding yet another post on this, but I've read all the other solutions and nothing is working. I have a very simple scenario.
MasterViewController adds a bunch of custom UIButtons to a view. That displays perfectly. When my custom button is called, I then route the button back to the MasterViewController to transition the next SecondViewController to display on top of itself.
My code is something like this:
[custom button setup func]
func setup() {
self.masterViewController = self.storyboard.instantiateViewControllerWithIdentifier("MasterView") as! MasterViewController
}
func clicked()
{
self.masterViewController.transition("SecondViewSegue") // matches the segue identifier perfectly
}
[MasterViewController func]
func transition(segueName: String)
{
dispatch_async(dispatch_get_main_queue(), {
self.performSegueWithIdentifier(segueName,sender: self)
});
}
What I've confirmed:
The custom UIButton fires
The performSegueWithIdentifier is firing
The prepareForSegue for the MasterViewController is firing
The viewDidLoad() func is firing in the SecondViewController
Things I've tried:
Reconnected the Segue
Confirmed spelling is identical (see above performance)
Tried with and without the dispath_async command (again, all fires)
There really isn't anymore code involved. I'm confused.
Thank you in advance.
Check the source code for storyboard by right clicking MyStoryBoard->Open As->Source Code.
Search for :trigger="accessoryAction"
If you find it , delete it.
Sometime ctrl+dragging adds this additional attribute causing issues with prepareForSegue.
Okay, I found my problem. I had accidentally created a new instance of the original UIViewController. So even though the functions were calling, it was not referencing the viewController on screen.

Related Links

how to add json file in ActionRequestHandler safari extinction
How do I make a control on a reused custom UIView trigger actions only on the ViewController currently being viewed?
NSPredicate SUBQUERY with nested arrays iOS Objective C
What delegate method will be called on receiving a push notification if the app is in killed/Force closed (Not in background) state?
didReceiveMessage not called after unlocking the iPhone screen?
How to access source view that perform segue from within that segue or destination view controller?
I want to use same UserInterface with different Data in ios
IQKeyboardManager not working when UITableView embedded in a container view
How to save image from camera/photo library into an array that is to be displayed in a UICollectionView
Adding target to UIControl
Uploading multiple builds of same iOS Application
Swift json delete key
Delay start of animation for UIView with CAKeyframeAnimation?
Why does an NSObject have to be initialized before its' .class-property is readable
Offline mode for Google Maps iOS
What does glGenVertexArraysOES() do and where is the documentation?

Categories

HOME
ffmpeg
servlets
feed
visual-studio-2012
angular-mdl
apache-spark-sql
google-weather-api
development-environment
vulkan
git-svn
qualtrics
w2ui
abaqus
spring-restdocs
windows-applications
pcap
masstransit
true-type-fonts
feedly
android-imageview
json-c
confirm
disqus
sourcetree
angular-xeditable
compass-lucene
logicblox
easy-digital-downloads
codeigniter-hmvc
sdcc
msysgit
virtualmin
sql-insert
android-calendar
ewsjavaapi
openwebanalytics
azure-cdn
jasmine2.0
ammonite
harvest-scm
ice
view-source
singlepage
itamae
cakephp-2.3
bootstrap-slider
ckcontainer
sizeof
nuitka
jstorm
viewengine
ctakes
cucumber-java
radix-sort
python-dragonfly
interpreted-language
spl
chunk-templates
spinach
translucency
ehcache-bigmemory
window-server
gitattributes
horizontalscrollview
tortoisecvs
razor-2
repaint
httpservice
clearcase-remote-client
aps
fig
serverside-javascript
sonata-media-bundle
delphi-2009
junit-runner
nawk
couchrest
apache-commons-dbcp
zephir
jflow
dependency-walker
hudson-plugins
jmdns
code-structure
google-website-optimizer
time-limiting
httpconnection
gemstone
demoscene
jquery-pagination
xtratreelist
palm-pre

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