iOS reloading a UITableView from a Swift class/object

前端 未结 3 1867
难免孤独
难免孤独 2020-12-17 02:53

I am trying to build a object oriented iOS app and I am having problems calling a table reload (ui interaction) from one of my swift class files.

If I am working wit

3条回答
  •  庸人自扰
    2020-12-17 03:07

    I don't know much Swift, but I've been writing Objective-C for iOS for a while now. (In Objective-C at least) you must call init on super before accessing self, otherwise you're object isn't initialized correctly. You're also not assigning self to the result of super.init(), which is necessary in Objective-C, looks like it isn't in Swift though.

    tl;dr -- Move the call to super.init() to the very first line in your FHEM class' init method.

提交回复
热议问题