IOS development question Summary

Source: Internet
Author: User
Tags notification center

7. VM simulated memory warning: [[uiapplication sharedapplication] _ running mmemorywarning];

8. If you cannot connect to the simulator or real machine, delete the deriveddata directory andClear Recycle Bin, You may need to restart xcode4.

 

1. Run is a crash. The following message is displayed in the log:

Couldn't register COM. myApp. debug with the Bootstrap Server. error: Unknown error code. this generally means that another instance of this process was already running or is hung in the debugger. program received signal: "SIGABRT ".

Solution: restart the iPhone/iPad System

 

2. Failed to load the image using the three20 framework. log the following prompt:

Ttdassert failed: 0 ==_queue. maxcontentlength contentlength <= _ queue. maxcontentlength

Solution: add it to appdelegate

[[Tturlrequestqueue mainqueue] setmaxcontentlength: 0];

 

3. after an object is dealloc, its pointer still exists, but the memory to which it is directed is too empty. In order to prevent the bad access problem when the object is determined to be nil elsewhere, you should immediately write an object = nil;

 

4. The tintcolor of uinavigationbar has changed, and the background color remains unchanged. solution:

@ Interface uinavigationcontroller (refreshbackitem)
-(Void) refreshbackitem;
@ End

@ Implementation uinavigationcontroller (refreshbackitem)
-(Void) refreshbackitem
{
Uinavigationbar * bar = self. navigationbar;
Uinavigationitem * backitem = bar. backitem;
Nsstring * Title = [backitem title];
Backitem. Title = @"";
Backitem. Title = title;
}
@ End

5. Clear the notification center.ProgramMessage:
[Application cancelalllocalconfigurications];
[Application setapplicationiconbadgenumber: 0];

6. -(Bool) isipad

{
Return[[Self model] isw.tostring:@"IPad Simulator"] | [[Self platform] rangeofstring:@"IPad"]. Location =0;
}

-(Bool) isretinadisplay
{
Return([[Uiscreen mainscreen] respondstoselector: @ selector (scale)] = Yes & [[uiscreen mainscreen] scale] =2.00);
}

-(Bool) isnewipad
{
Return([Self isipad] & [self isretinadisplay]);
}

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.