Solve the messagesenttodeallocatedinstance0x52cc690 error. This error occurs when you try to assign a value to an object. 22. Solve the messagesent to deallocated instance 0x52cc690 error.
This error occurs when you try to assign values to an object, for example:
TfContent. text = bodyText;
In this case, you can enable the NSZombieEnable option, and the console will have the following output:
* **-[CFString _ isNaturallyRTL]: message sent to deallocated instance 0x52cc690
NOTE _ isNaturallyRTL message is sent to a released object. From the preceding statement, these two objects may be tfContent and bodyText.
You can print the memory address of tfContent or bodyText to see which object has been released:
NSLog(@"tfContent:0x%x",(int) tfContent);NSLog(@"bodytext:0x%x",(int) bodyText);
The result shows that bodyText is released in advance:
tfContent: 0x52cf160bodytext: 0x52cc690
Retain bodyText in appropriate places to solve the problem.
23. putpkt: write failed: Broken pipe error
Restart the device.
24.. hfile not found
In fact, this. h file is not included in the target. Select the corresponding. m file, click the "ShowUtilities" button (on the right side of the toolbar), find Target Membership in Utilities, remove the check mark in front of Target, and then check again. That is, it is equivalent to re-adding the. m file to the Buildphase of target.
25. Xcode 4: how to convert xib for iPhone to for iPad
In Xcode 3. x, convert xib from iPhone to iPad through the Create iPad Version menu.
However, in Xcode 4.x, this menu cannot be found. After some exploration, I found that xib can be converted into an iPad using the following method.
1. modify the xib source file
The xib file is actually an xml file. In Project Navigator, right-click the xib file and select "Open As-> Source Code". you can view the xib file in Source Code mode and find "com. apple. interfaceBuilder3.CocoaTouch. change the XIB line to "com. apple. interfaceBuilder3.CocoaTouch. iPad. ". iPad ".
Press Replace + F to open the search box and click Replace to change the Replace mode. Replace all "IBCocoaTouchFramework" in the xib file with "IBIPadFramework.
Press seconds + S to save the changes.
2. modify the xib view size.
Right-click the xib file, select "Open As-> Interface Builder-iOS", and Open it in IB mode.
Select the root View (UIView) in the xib file, find the Size option on the property panel, and change it to Full iPad Screen.
Now you can have an iPad version of xib.
26. icon dimensions (0x0) don't meet the size requirements.
Open BuildSettings of the Project, find Compress PNG Files, and set the value to No.
Or:
Select the png File. in the FileInspector panel, find the File Type and change it from "PNG" to "Icon ".
27. WARNING: noprevious prototype for function
Open Target-> buildsettypes, search for prototype, and change the Missing Function ProtoTypes to NO.
28. The "Command/Developer/Platforms/iPhoneOS. platform/Developer/usr/bin/clangfailed with exit code 1" error occurs during CorePlot compilation"
Change Scheme from iOS Device to iPhone 5.0 Simulator. Or change Compiler for C/C ++ to LLVM GCC4.2. At the same time, Core Plot 1.0 no longer supports the old armv6 CPU.
29. Changing the alpha value of UIView using CABasicAnimation is invalid.
The alpha value of UIView. it is actually "opacity" in CALayer. use opcity as the keyPath.
30. CorePlost: After the Axis Label is customized, Tick Mark is not displayed.
Set majorTickLocations of Axis to where you want to display the tick mark.
NSMutableArray*customTickLocations=[[[NSMutableArray alloc]init]autorelease]; for(int i=0;i<10;i++){[customTickLocationsaddObject:[NSNumber numberWithInt:i]];}xAxis.majorTickLocations=[NSSetsetWithArray:customTickLocations];
31. the custom UITableViewCell and indentationLevel cannot take effect.
You need to implement the layoutSubviews method in the custom UITableViewCell.
- (void)layoutSubviews{[super layoutSubviews];float indentPoints = self.indentationLevel *self.indentationWidth;for(UIView *view in self.subviews){view.frame = CGRectMake(view.frame.origin.x+indentPoints,view.frame.origin.y,view.frame.size.width, view.frame.size.height); }}
The above is the content for iOS development FAQ (3). For more information, see PHP Chinese website (www.php1.cn )!