uiviewcontroller - Crashing while calling a Action button from SecondViewController.view in XCode6 Swift -


while calling action button secondviewcontroller.view gives runtime error in xcode6 (beta) / swift environment. please refer below more details.

my scenario below

  1. trying call firstview screen ‘didfinishlaunchingwithoptions’ below works fine.

    var varfirstviewcontroller:firstviewcontroller?= firstviewcontroller(nibname:"firstviewcontroller", bundle: nil) self.navigationcontroller = uinavigationcontroller(rootviewcontroller:varfirstviewcontroller) self.window!.rootviewcontroller = self.navigationcontroller" 
  2. from firstviewcontroller.view trying call second view controller below code works fine

    let sec: secondviewcontroller = secondviewcontroller(nibname: nil, bundle: nil)      self.view.addsubview(sec.view) 
  3. from secondviewcontroller.view trying trigger actionbutton throws runtime error exc_bad_access

appreciate expertise on this.


Comments

Popular posts from this blog

javascript - RequestAnimationFrame not working when exiting fullscreen switching space on Safari -

jsf - How to ajax update an item in the footer of a PrimeFaces dataTable? -

jquery - Keeping Kendo Datepicker in min/max range -