last day (15 days later) » 

9:09 AM
0
A: Not able to move screen from my obj c to my another vc which have home tab bar application

Abu Ul HassanYou Case actually contains three thing that is TabbrController and may be navigation controller and of course UIViewController, so when posting a notification from a non UIViewController class you will never know on what controller you are so accessing nav controller with 0 index will not solve y...

 
this is just an method needs to add it in my class ? func topViewControlle
 
yes in class you may create new Or use it where onSessionOver method is used and then access it with name of class.
 
Value of type '(UIViewController?) -> UIViewController?' has no member 'topViewController'
in this line topViewController.topViewController()?.navigationController?‌​.pushViewController(‌​scoreBoardController‌​, animated: true). I am getting this errorValue of type '(UIViewController?) -> UIViewController?' has no member 'topViewController'
I updated my post.
 
instead of this topViewController write class name
 
My home tab bar has navigation controllers , But my sessionvc dont have any navigation controller. Its just an single vc
 
9:09 AM
tell me name your viewController
 
i added in app delegate
AppDelegate.topViewController()?.navigationController?.pushV‌​iewController(scoreB‌​oardController, animated: true)
 
yes now its fine
 
Instance member 'topViewController' cannot be used on type 'AppDelegate'; did you mean to use a value of this type instead? getting this error
 
create a separate class Utility place this method over there and then user it like utility.topViewController()
 
again same Instance member 'topViewController' cannot be used on type 'ViewUtils'; did you mean to use a value of this type instead?
i created one seperate class in my` utils.swift` file . like class ViewUtils { // code method }
 
9:09 AM
import UIKit too and use NSObject class ViewUtils:NSObject{ }
 
yes, i tried this too...getting same Instance member 'topViewController' cannot be used on type 'topvc'; did you mean to use a value of this type instead?
is that correct ? topvc.topViewController()?.navigationController?.pushViewCon‌​troller(scoreBoardCo‌​ntroller, animated: true)
 
sorry i am updating my answer wait
 
i think problem with this line topvc.topViewController()?. still its throwing same error
 
updating answer
 
same error Instance member 'topViewController' cannot be used on type 'TopView'; did you mean to use a value of this type instead?
 
9:09 AM
check the answer i have updated it with class
issue resolved ?
 
No, still getting white screen, debugging it with breakpint
it reach here` TopView.topViewController()?.navigationController?.pushViewC‌​ontroller(scoreBoard‌​Controller, animated: true)`
again getting white screen only
Even i changed to TopView.topViewController()?.navigationController?.present(s‌​coreBoardController, animated: true) but it still showing white screen
 
9:23 AM
you are using old code you have not checked my updated answer with if let conditions
 
 
2 hours later…
11:10 AM
i added
still, its going to else condition
and after that coming as white screeb
screen
 

last day (15 days later) »