Summary of problems encountered during iOS development

Source: Internet
Author: User
Tags svn svn update

Summarize the problems encountered during personal development and keep updating:

1, the official website speakhere copy to own project, the hint CADebugPrintf.h file not found:

Select the Target, open the Build Settings pane, search for "preprocessor Macros". Leave The fields blank (I ' ve got rid of a DEBUG entry), which is to empty preprocessor macros parameter values; (Remember to add audiotoolbox.framework)


2, CAStreamBasicDescription.h unknown type name class

Speakhere Copy to your project, there will be many file prompts the above error, because the OC referenced C + + file, will refer to C + + file of the. m file to. mm, and then in another. h file reference. MM class, note that this time using @class name, do not use # Import ' name '


3, the use of Xcode 4 o'clock, the file has been deleted, but there will be missing file error, which is generally the result of SVN or git, there are several ways to delete:
Method 1: A method for bulk deletion, delete the. svn file:
Enter the CD (with spaces) in the terminal, drag the project folder into, enter
Enter the command line:
RM-RF find. -type D-name. SVN
And then enter.


Method 2: Delete the hidden. svn file

command line run defaults write Com.apple.finder appleshowallfiles TRUE killall Finder


Turn on the show hidden file, then delete the. svn file in the Engineering directory, and then restore defaults write Com.apple.finder appleshowallfiles FALSE killall Finder


4. Obstructing is blocking item under version control

It was SVN issue. After a clean up and update in build folder, I could deletes the build folder and add set it to ignore.

Did you have touchxml from a svn repository? The May check for any ". xxxx" folders.

Update:i meant running SVN cleanup and SVN update commands.


5. Specify the different rotation direction of view in the same application and overload in each view:

-(BOOL) Shouldautorotatetointerfaceorientation: (uiinterfaceorientation) interfaceorientation
{
Return (interfaceorientation!= uiinterfaceorientationmasklandscapeleft);
}

-(Nsuinteger) supportedinterfaceorientations
{
return uiinterfaceorientationmasklandscaperight;
}

-(BOOL) shouldautorotate
{
return YES;
}

IOS5, 6-in-all.

6, the use of "=":

In development, you often encounter the value of a variable to pay another variable, the most common method is a.value= B.value, this is actually the address of the B.value directly to the A.value, which produces the effect is: if the value of A.value changed, then B.value will also change. can use A.value=[b.value mutablecopy], copy also cannot, copy to achieve the same effect as direct assignment

7, XCode copypngfile Error (no picture or directory found)

1. Click the project targets

2. Click Build Phases

3. Click Copy Bundle Resources

4. Look at the resources inside what is displayed in red, and then select it, the bottom has the button to delete. Just erase it, or use PS to open the file and save it as no interleaving.


Related Article

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.