iOS Learning (errors encountered in Project 1)

Source: Internet
Author: User

1.[appmodel Copywithzone:]: Unrecognized selector sent to instance 0x7ffda9f4cf70

Terminating app due to uncaught exception ' nsinvalidargumentexception ', Reason: '-[appmodel copywithzone:]: Unrecogni Zed Selector sent to instance 0x7ffda9f4cf70 '

First throw Call stack:

The cause of this error: The problem with attribute definitions should be noted when defining a property

Some problems may occur when the property

Nonatomic: Single thread, high efficiency

Atomic: Multithreading, low efficiency benefits, but default

readWrite: Readable and writable, it is also the default

ReadOnly: Readable only

Assign: Refers to the int,float. Equal value type, he is the default

Copy: Refers to a String object. such as name

Retain: Refers to an object. such as time objects

Strong: Strong references

Weak: Weak references

The reason I went wrong is that when I define a class object, I misuse copy instead of strong

2. when using TableView , it will be found that sometimes this method does not execute, Reason:_tableview frame is not set, there is _dataarry An unassigned value is empty. There is also the use of the data in the asynchronous way, but the wood has to refresh the TableView data

-(uitableviewcell *) TableView: (uitableview *) TableView Cellforrowatindexpath: (Nsindexpath *) indexpath{

return nil;

}

3. Data NSData errors caused by uninitialized initialization

Terminating app due to uncaught exception ' nsinvalidargumentexception ', Reason: ' Data parameter is nil '

4. If the extracted data is empty, the following error will occur

Terminating app due to uncaught exception ' nsrangeexception ', Reason: ' * * *-[__nsarraym Objectatindex:]: Index 3 Beyon D bounds [0.. 2] '

Copyright NOTICE: This article for Bo Master original article, without Bo Master permission not reproduced.

iOS Learning (errors encountered in Project 1)

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.