In iOS development, we need to perform localization to display the content of some resources (mainly strings) in different languages. For example, "edit" is displayed in English, and "Edit" is displayed in Chinese ". The customer of a recent project
First:
// Status bar animation duration CGFloat duration = [UIApplication sharedApplication]. statusBarOrientationAnimationDuration; [UIView animateWithDuration: duration animations: ^ {// modify the direction of the status bar and view to forcibly
Author: Sun Dongfeng 2009-12-01 (source)
In my previous article "BSD Socket for iPhone network communication, I tried to use BSD Socket on the iPhone platform to build a framework that is compatible with both TCP/IP and HTTP protocols. In the
IPhone multi-thread programming experience
Anonymous Internet comments (0) font size: T | T
Multi-threaded programming is the best way to prevent the main thread from being congested and increase the running efficiency. The original multi-threaded
The precision of the finger on the screen is very different from that of the mouse pointer. When a user clicks a screen
The area is actually an elliptical shape, and it is closer to the next point than you think. The size and shape of the touch area
Since iOS5 xcode4.2 introduces ARC (AutomicReferenceCounting), there are some minor changes when xcode4.2 is used to create a project.
The NSAID utoreleasepool is replaced by the @ {Autoreleasepool // Code for autoreleasepool} block.
The _ strong
As shown in the third lecture, even if the XIB file is not used, you can rewrite the viewDidLoad function to configure any view or Controller. Here we will look at how to program and customize such views and controllers.
First, if the XIB file
This article briefly introduces how to use GPS. Using GPS is roughly divided into the following two steps.
Add CoreLocation. framework.
Generate the CLLocationManager measurement position.
The test code is as follows:
// LocationViewCtrl. h
#
In the previous section, we talked about some knowledge about the sprite table and used Zwoptex to integrate images and generate plist files. In this section, we apply the tool in the previous section to regenerate a pair of genie tables and
By default, all iOS devices will automatically lock the screen after the preset sleep time. If your app does not want the iOS device to automatically lock the screen, you can use the following methods to keep the screen on.
Ios code
Nsicationicationcenter is specially set for message communication between different classes in the program, which is extremely convenient to use,
Long story short.
Set the notification, that is, where (which class) the notification is to be
In addition to the CLLocation library, Mapkit can also be used to obtain information about the current location. I personally think Mapkit is more useful and convenient when you need more accurate location information. the usage is as follows:-(Void)
NSMutableURLRequest * request = [NSMutableURLRequestrequestWithURL: self. address cachePolicy: NSURLRequestReloadIgnoringLocalAndRemoteCacheDataTimeoutInterval: self. defaultTimeout];
TimeoutInterval is no longer valid.
This problem exists only in
Here we will mainly discuss the problem of mixing with the C language in the IPHONE. Let's take a look at the Code:
[Html] BOOL differentInt (int m, int n ){If (m! = N)Return YES;ElseReturn NO;}NSString * boolString (BOOL yn ){If (yn = YES ){Return @
In the afternoon, I encountered a strange problem. I deleted the corresponding icon Based on the icon tag and used the removeFromSuperview function. However, when the tag is 0, the following code falls into an endless loop. Finding the cause is
Origin:
To obtain the specified character in a string, use a regular expression and write the following code:
[Cpp] NSString * htmlStr = @ "oauth_token = token & oauth_token_secret = 3118a84ad942567990ba50f5649632fa & name = foolshit ";NSString *
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.