Solutions to iPhone Development Problems

Source: Internet
Author: User

(1) iPhone initwithframe: reuseidentifier: isdeprecated

Have you been troubled by the initwithframe: reuseidentifier: is deprecated warning? This syntax is no longer used in Versions later than ios3.0. The solution is as follows:

Find the following code:

Objective-C code

1.-(ID) initwithframe :( cgrect) frame reuseidentifier :( nsstring *) reuseindentifier {

2. [Super initwithframe: frame reuseidentifier: reuseidentifier];

3 ....

4 .}

Modify:

Objective-C code

1.-(ID) initwithstyle :( uitableviewcellstyle) style reuseidentifier :( nsstring *) reuseindentifier {

2. [Super initwithstyle: style reuseidentifier: reuseidentifier];

3 ....

4 .}

(2)Missing required architecture i386 in file

Solution:Target-> build settings-> Search paths: Delete the content in frameworksearch paths.

(3) Delete some unused applications in the iPhone Simulator

Solution: Hold down an icon and wait for a cross to appear. Then, click "delete ".

(4)In interface builder, how does tableview style have no indexed option?

How can I change the table View to the index style?

Solution: change the style attribute to the plain option.

(5)[Self. navigationcontroller pushviewcontroller: nextcontroller animated: Yes]; thread 1: Program received ed signal: "SIGABRT" appears at runtime"

Solution: Check that the output prompt is

Terminating app due to uncaught exception 'nsinternalinconsistencyexception', reason: '-[uiviewcontroller _ loadviewfromnibnamed: Bundle:] loaded the "secondlevelviewcontroller" nib but the view outlet was not set .'

This means that my secondlevelviewcontroller is not bound to the corresponding XIB file, open the corresponding XIB file, hold down the control, connect the file's owner icon to the view icon, select the view output port, save, OK.

(6) code nsstring * name = [[nsstringalloc] initwithformat: [resultsobjectforkey: @ "appname"]; warning:

"Format not a string literal and no format arguments"

Solution: change the code to the following line.

Nsstring* Name = [[nsstring alloc] initwithformat: [Results objectforkey: @ "appname"], nil];

(7) The use of asihttprequest needs to link to the relevant class library.

Add cfnetwork. Framework and systemconfiguration. Framework to the project,
Mobilecoreservices. Framework, CoreGraphics. Framework, and libz.1.2.3.dylib Class Libraries

(8) xcode 4 warning: the copy bundle resources build phase contains this target's info. plist File

Solution: Move the info. plist file to the resources directory instead of the target directory.

 

 

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.