Objective
There are five ways to locally cache data in iOS:
1. Direct writing file: The objects that can be stored are nsstring, Nsarray, Nsdictionary, NSData, NSNumber, all of which are stored in a property list file (*.plist
-(void) Viewwillappear: (BOOL) animated{
//Set navigation bar background picture is an empty image, so it is transparent
[ Self.navigationController.navigationBar Setbackgroundimage:[[uiimage alloc] init] Forbarmetrics: Uibarmetricsdefault];
The request header can pass some information that the web wants, but this method has some limitations, if the Web jumps when the header information will be message, the best way is to customize the cookie pass value
nsurl* url = [Nsurl URLWithString:
Modal Jump plus navigation bar,
Yesterday to change the project found by the commonly used push jump suddenly can not use the view of the code to know that the original page is the previous page modal jump over, so need to bring the navigation bar
This article directory one, the custom layer method 12, the custom layer method 23, other
The custom layer, in fact, is the drawing on the layer, a total of 2 methods, described in detail below. Back to the top one, custom layer Method 1
Method
If the project requires an urgent audit, Apple provides an emergency audit channel, the following describes how to apply for an emergency audit.Apply for expedited audit of the direct Web site:Https://developer.apple.com/contact/app-store/Apple
You can use the instruments in the Xcode tool to automatically open the application by executing the script. The following commands are executed:
instruments -w -t
iOS Memory Management
iOS memory management on the whole, four points:① own generation of objects, holding themselves;② is not a generation of their own objects, they can hold;③ no longer needs to be released when the object is held by itself;④
Before, for the use of Uitextfield no specific research, sometimes always feel the limitations of use, in fact, some attributes before not know, today for Uitextfield do a summary. one, the border display 1, the system default border
Uitextfield
Today I tried to call on a viewcontroller:
-(void) Presentmodalviewcontroller: (Uiviewcontroller *) Modalviewcontroller animated: (BOOL) animated
To show a translucent viewcontroller:
Uiviewcontroller *VC = [[[Uiviewcontroller alloc] init]
Preface
The usual way to monitor headphone plug in iOS is to use the headset provided by the iOS system to notify event avaudiosessionroutechangenotification. The code structure is the following system notification method
Add observation
#pragma mark-#pragma mark Application Lifecycle #define pdfurl -(BOOL) Application: (UIApplication *) Application D Idfinishlaunchingwithoptions: (nsdictionary *) launchoptions { //Override Point for customization after application launch.
Today, the development encountered a problem, is the camera, photo album page City English, need to be a corresponding Chinese, also encountered before, but did not write down, but also have to Baidu again, good memory than rotten pen.
When
There are three ways to implement regular expression matching in iOS. Now record them all here:1. Using nspredicate (predicate) matchingFor example, to match a valid mailbox:
NSString *email = @ "nijino_saki@163.com";
nsstring *regex = @ "[a-z0-9a-z.
My limit is 8 digits after the decimal point.
-(BOOL) TextField: (Uitextfield *) TextField Shouldchangecharactersinrange: (nsrange) range replacementstring: ( NSString *) string{//limit only digits can be enteredBOOL Ishavedian = YES;if ([String
In the actual project development in order to give users a better experience, some delay operation we will put in the child thread.
Today we'll talk about the use of multithreading in practical projects.
Let's first look at the basics of
The company has previously called for a backend interface to be invoked in a webview, requiring some parameters to be requested. Normally a request is a GET request, but a POST request is required for the form submission, so when we recreate a
Directory structure:
A, supporting files:
MAIN.M and resource files
Xxx-info.plist: Contains list of application-related attributes, such as version, program name, etc.
. pch file: Precompiled header file, equivalent to StdAfx.h in MFC,
/**
* Detecting the parameters to be used for version upgrade
* * Ifeverappid = @ "1076057848"; AppId; Invoke method to detect version update [selfcheckversion];
*
* Detect whether the software needs to be upgraded
*/
-(void) checkversion
{
Get the
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.