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

Any one Know ?? how to get router ip address from mac and iPhone? [closed]
What means iOS Xcode plist warning?
Deleting NSUserdefault Array from a UITableView
how to remove view from superview in apple watch / watchkit in swift
Identifying the trigger of iOS Remote notifications callback
Linker command failed, cannot find library in existing project
Stop all the functions when changing Viewcontroller
iOS & Parse Push Notification - iPhone 5s/c
Flick a UIScrollView programmatically
Negative Error testing in iOS PayPal Sandbox mode
why i have this showAlert error?
Issue in sending email from iOS device?
iPad crash with Foundation
Reorder Uitableview with Parse Objects?
Running Xamarin.iOS tabbed application in VS2015
How to change presentViewController Transition animation

Categories

HOME
printing
collections
lua
dicom
orbeon
isis
word-vba
asana
chronicle
vsix
google-adwords
phpmailer
zipfile
square-connect
google-maps-sdk-ios
pie-chart
cross-compiling
graphengine
frequency
sparkpost
flow
pywin32
gas
libpcap
montecarlo
cadvisor
easendmail
angular-services
jtable
masstransit
operator-keyword
charts.js
ose
dashboard-designer
p4-lang
spring-saml
tibco-ems
h5py
wso2iot
angular2-seed
projection
backwards-compatibility
mediawiki-api
azure-cdn
scoring
ganglia
glfw
node.js-tape
findall
turbo-c
logstash-jdbc
perspective
olingo
dashing
ng-annotate
sql-server-2016-express
pager
relaxng
ssha
hypervisor
gulp-protractor
equinox
maven-cargo
alienvault
ehcache-bigmemory
targetinvocationexception
laravel-validation
django-postgresql
lwuit-list
publish-actions
before-save
clearcase-remote-client
syndication-feed
short
dirpagination
mydbr
windward
modalpopupextender
jxta
external-dependencies
zephir
loadlibrary
source-highlighting
hogan.js
code-structure
asp.net-session
working-directory
time-limiting
sticky-footer
obout
program-files
android-assets
demoscene
formsauthentication
etrade-api
android-3.1
renderaction
webshop
corporate-policy

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