App crash only on iPhone Device and not in Simulator

后端 未结 5 1633
予麋鹿
予麋鹿 2020-12-11 12:21

In my app, when I press a button the method called for that button first assigns my textfield texts directly to NSArray object like:

 val = [[NS         


        
5条回答
  •  一个人的身影
    2020-12-11 13:01

    Delete the app from simulator/ delete the build file from Mac/ clean the product from XCode and then again run it in simulator. Check if it crashes in simulator now.

    Take a look at this link : EXC_BAD_ACCESS signal received. Also, Take NSLog of all the textfield.texts before putting them in array. May be one of them has become nil.

提交回复
热议问题