App crash only on iPhone Device and not in Simulator

后端 未结 5 1615
予麋鹿
予麋鹿 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:20

    All objects involved in array creation using initWithObjects should be actual objects. There is no enough code in your question to know if lat and longt are objects too. Are they?

    If they aren't, wrap them with [NSNumber numberWithFloa:<# the float #>].

    If that's not the problem, check SO questions regarding EXC_BAC_ACCESS to learn to debug them.

提交回复
热议问题