In-depth understanding of iPhone screen dual-buffering technology (iphone development-basics)
Author: Sun Dongfeng (source)
In the development of recent projects, I need to use the "dual-screen buffer" technology. "dual-screen buffer" is the most
1. If you want to process an image in a program (to obtain a part of an image), you can use the following code:
UIImage * image = [UIImage imageNamed: filename];
CGImageRef imageRef = image. CGImage;
CGRect rect = CGRectMake (origin. x, origin. y,
UIView * view = [[[[UIApplication sharedApplication] windows] objectAtIndex: 1] subviews] lastObject]; // obtain a subView of a window NSInteger index = 0; // used to name the saved pngFor (UIView * subView in [view subviews]) {// traverses the
After Xcode4 is started, a welcome window is displayed. Click "Create a new Xcode project" to Create a project.
You can also create a new project by using the menu or shortcut.
Select a new project template
Xcode4 provides several project
Objective-C has three Dynamic Features
1. Dynamic type
Dynamic typing-determining the class of an object at runtime
The object type is determined during running.
2. dynamic binding
Dynamic binding-determining the method to invoke at
To do well, you must first sharpen your tools. When developing iPhone applications, it is important to have a deep understanding of iPhone OS/SDK and Objective-C 2.0.
IPhone OSThe iPhone OS consists of four main parts. The following is a simple list
I wrote an article a few days ago: Get the current date and time and display it in LCD format. According to the practice of this article, the time is displayed horizontally, similar to the following:
What should I do if I want to display
In iPhone development, we often need to perform animation switching between different pages, which looks better. There are three basic animations:
1. UIView
UIView provides five official animation effects for you:
UIViewAnimationTransitionNone
Obtaining screen resolution is a very useful function. In some game-related development, drawing and screen resolution are inseparable. Obtaining the resolution of the current screen is essential.Two steps are allowed to obtain the screen resolution.
IOS provides support for previewing files using other apps. This is Document Interaction Controller. In addition, iOS supports file association, allowing other programs to call your app to open a file. In addition, starting from 4.2, Quick Look
1. Create a single view application iOS application project named CustomView. For example, we do not add any controls to customviewcontroller. xib:2. Create a CustomView. xib. The procedure is as follows:Drag a label and a button to the
The xml string is:
// Parse button event
-(IBAction) btnXml
{
NSString * str = [uitextview1 text];
// Convert string to data
NSData * xmlData = [str dataUsingEncoding: NSUTF8StringEncoding];
// NSXMLParser class is required for xml parsing.
Today we are mainly talking about the basis of C. This time we will mainly explain it in detail by code.First of all, the biggest headache is the difference between a = I ++ and a = ++ I. a = I ++ first assigns a value and then increases itself, a =
1. After synchronizing the application, find the log file you want to view. The log file corresponds to the mac location and xp \ vista location.2. I found that log files are not readable in hexadecimal notation. How can I convert them into what we
This document describes how to use the NSUserDefaults class to store and change application settings. We will create a Contact application to store user-specified images and Contact information.
What is NSUserDefaults?The NSUserDefaults class is
In the project, I want the page Jump to have different animation effects. I am a person who likes to submit public code and write it as a Tool class. Of course, this will not happen. Well, check the Code:. H file:[Cpp]# Import # Import @ Interface
What to do with custom View1. Initialization:-For the View created in the program, override initWithFrame initialization.-For views loaded in nib, override initWithCoder initialization.-After the nib file is loaded, you can use awakeFromNib to
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.