ios - Swift app crashes with (lldb) as only debug output after @IBAction with a UIButton sender -


i see after researching particular debug output isn't super rare, causes can differ pretty greatly. i'm new ios development , have been trying figure out why app crashing, can't crack it. i'm going supply lot of different code snippets, because have hunch what's wrong.

i'm partially following along this video tutorial todo list, while differing in ways. notably, chose not start tabbed application template , instead looked way unwind views.

here simple object manager class tutorial has create:

import uikit  var rmndrmgr = remindermanager()  struct reminder {     var name = "none"     var description = "none" }  class remindermanager: nsobject {      var reminders = [reminder]()      func addreminder(name: string, description: string) {         reminders.append(reminder(name: name, description: description))     } } 

below first view controller:

import uikit  @objc(todolisttableviewcontroller) class todolisttableviewcontroller: uitableviewcontroller, uitableviewdelegate, uitableviewdatasource {      override func viewdidload() {         super.viewdidload()     }     override func didreceivememorywarning() {         super.didreceivememorywarning()         // dispose of resources can recreated.     }      @ibaction func unwindtolist(segue:uistoryboardsegue){ //        var source = segue.sourceviewcontroller //            addtodoitemviewcontroller //        var item: todoitem? = source.todoitem //        if item != nil { //            self.todoitems.addobject(item) //            self.tableview.reloaddata() //        }     }      override func tableview(tableview: uitableview, numberofrowsinsection section: int) -> int {         return rmndrmgr.reminders.count     }      override func tableview(tableview: uitableview, cellforrowatindexpath indexpath: nsindexpath) -> uitableviewcell {          let cell: uitableviewcell = uitableviewcell(style: uitableviewcellstyle.subtitle, reuseidentifier: "default")          cell.textlabel!.text = rmndrmgr.reminders[indexpath.row].name          cell.detailtextlabel!.text = rmndrmgr.reminders[indexpath.row].description          return cell     } } 

and second view controller:

import uikit  class addtodoviewcontroller: uiviewcontroller {      @iboutlet var textreminder: uitextfield!     @iboutlet var textdescription: uitextfield!             //events     @ibaction func addreminder_click(sender: uibutton) {      }       //touch functions      //uitextfielddelegate     //"first responder" keyboard. resign when user presses return key     //basically gets rid of keyboard when user submit     func textfieldshouldreturn(textfield: uitextfield) -> bool {         textfield.resignfirstresponder()         return true     }      override func touchesbegan(touches: set<nsobject>, withevent event: uievent) {         self.view.endediting(true)          println("clicked out")     } } 

and here "add" view looks like: [removed because don't have reputation post images] imgur link instead

i have navigation bars uibarbuttonitems @ top of views. right "close" , "done" buttons (which live in navigation bar) same thing: unwind user main list. ideally "submit" button (which not in navigation bar, on normal screen) add user has typed array shown on other view. "done" button removed or refactored.

the current behavior, though, app crash debug text of (lldb) when click on "submit" button regardless of code inside it's action function. reasonably sure hooked correctly because have tried both writing out function signature , control-dragging button code generate it.

i believe problem lies navigation bars, lifted different todo list tutorial. however, unable descriptive enough log know why or figure out how fix it. i'll gladly post more information xcode should required, please ask. i'd super grateful if me identify mistake , learn it.

i bet added breakpoint in xcode editor. try hitting typing 'continue' console appears 'lldb'. if run time error, see error messages.

the blue arrow breakpoint reference. enter image description here


Comments

Popular posts from this blog

python - TypeError: start must be a integer -

c# - DevExpress RepositoryItemComboBox BackColor property ignored -

django - Creating multiple model instances in DRF3 -