且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

使用“故事板"将数据插入我的数据库表时出错,即“没有可见的界面......"?

更新时间:2022-06-15 22:22:55

设置属性的语法错误,应该是

Your syntax to set a property is wrong, it should be

 products.nameProd = self.txtNameFeild.text;

编译器翻译成等价物

[products setNameProd:self.txtNameFeild.text];

并且 arrayOFProducts 应该声明为 NSMutableArray如果您想向其中添加对象.

And arrayOFProducts should be declared as NSMutableArray if you want to add objects to it.

(请注意,您可以从源代码中删除 @synthesize 语句,当前的 Clang 编译器会自动合成属性.)

(Note that you can remove the @synthesize statements from your source code, the current Clang compiler synthesizes properties automatically.)