1. url Encoding
When the HTTP request in IOS encounters Chinese characters, it needs to be converted into a UTF-8, the method used is:
Nsstring * encodingstring = [urlstring stringbyaddingpercentescapesusingencoding: nsutf8stringencoding];
2. URL
Use SOCKET for C/S structure programming and connection process
The server listens to a port for connection requests. ServerProgramThe client is in a blocked state and can only run down until it sends a connection request to the server. Once
In iPhone applications, sometimes we want to forcibly change the display mode from a vertical screen to a horizontal screen (or vice versa). cocoachina member "alienblue" provides us with two ideas.
First, manually change the attributes of view.
Environment: xcode 4.2
1. Create a target for the unit test
Select a project and click Add target to add the cocoa touch unit testing bundle type target under iOS-Other (figure 1 ). (According to some information on the Internet, the target
This siteArticleBothLi huaming himiOriginal, reprinted must be clearly indicated: Reprinted from[Heimi gamedev block]Link: http://www.himigame.com/iphone-cocos2dx/721.html☞Click to subscribe☜The latest developments in this blog! Notify you of the
If you want the app to pass the review, you must determine the network environment and handle alerts when there is no network.
Apple's routine reachability describes how to obtain/detect the network status. To be appliedProgramTo use Reachability
when coredata is used, when you store data:
nsmanagedobject * oneobject = [nsentitydescription insertnewobjectforentityforname: @" drawdata " inmanagedobjectcontext: managedobjectcontext]; [oneobject setvalue: data. backgroundimageurl
There are three main methods for iOS Multithreading
(1) nsthread
(2) nsoperation
(3 )**
The following describes the three methods.
1. nsthread
The call method is as follows: If the function needs to input parameters, it can be passed
1. Convert string to date
Nsdateformatter * dateformat = [[nsdateformatter alloc] init]; // instantiate an nsdateformatter object using handler [dateformat setdateformat: @ "yyyy-mm-dd hh: mm: SS"]; // set the time format, which can be set to the
Generally, io-related operations in IOS are multi-threaded and not completed in the main thread. This is to avoid the time-consuming Io operations getting stuck in the main thread. However, in some cases, we want the main thread to wait for the IO
Compile DCMTK on iOS platform
Luo chaohui (http://www.cnblogs.com/kesalin)
This article follows the "signature-non-commercial use-consistency" creation public agreement
DCMTK is GermanyOffisThe cross-platform open-source C ++ library
1. Determine if the string is equal using isw.tostring:
Nsstring * astring01 = @ "this is a string! ";Nsstring * astring02 = @ "this is a string! ";Bool result = [astring01 isw.tostring: astring02];Nslog (@ "Result: % d", result );
2. The judgment
At present, most enterprise-level IOS applications mainly rely on reports and document approval, and the development trend of applications is bound to develop towards the Web. Although native apps have incomparable flexibility.
How to localize a
Generally, the navigation controller contains four objects: uinavigationcontroller, uinavigationbar, uiviewcontroller, and uinavigationitem;
Navigationitem is stored on uinavigationbar. We can know that a navigation controller controls multiple
The younger brother hasn't updated it for a long time.
Archiving in IOS is what we know about serialization and deserialization.
We can use plist to store simple data types. But what if I want to persist the Data Types I have defined?
This requires
AAC Audio ConverterIntroduction: audio files in any format can be transcoded and compressed into AAC MPEG-4 (m4a) format. It can be applied to the app that needs to transmit sound files, so that it can compress a large volume of sound files (such as
How to Hook messages in IOS
After the end of the year, it's time to get started.
We all know that a lot of messages can be easily hooked through APIs in windows. There seems to be no existing APIs in IOS (maybe I haven't found them yet ), some
Document directory
Step One: create three forms: SwitchViewControl subform1 subform2
StepTwo implements SwitchViewControl form and background control toolbar button switching interface effect
Step Three implements child forms
Upper
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