How to determine the types of iOS devices (iPhone, iPod, and iPad)
Function:
-(Bool) checkdevice :( nsstring *) name { nsstring * devicetype = [uidevice currentdevice]. model; nslog (@ "devicetype =%@", devicetype); nsange range =
During app development in iOS, sometimes, for Bug Tracking or feedback, the user's device, system information, and application information need to be automatically collected. This information is convenient for developers to diagnose problems, of
IOS sandbox mechanism. Applications can only access files in their app directories. Unlike android, iOS does not have an SD card and cannot directly access images, videos, and other content. Content generated by iOS apps, such as files and cached
When we use xcode to develop iPhone and iPad applications, we can use the following table to set the application icons and startup images:
Image name
ImageSize(Unit: pixels)
Application Platform
Icon.png
57x57
The following are some of my summary. If something is wrong, I hope you will give me more advice.
We can see this code in the official document:
In the MyClass. h file
@ Interface MyClass: NSObject {MyObject * myObject ;}@ Property (nonatomic,
When we first came into contact with Quertz 2D, it was important that the drawing was performed in the context of the drawing. Each view has an associated context.
Therefore, if you draw a graph in a view, we need to retrieve the current
We have all learned bit operations. In our work, using good bit operations can greatly improve program efficiency. Here is a simple example of my application:
-(Void) buttonClick :( id) sender {
UIButton * button = (UIButton *) sender;
Int tag =
Before understanding CALayer, You Need To Know What layer is.
The middle layer of IOS development is a very important concept. You can find the layer component in the subclass of UIView. The layer is a child film located on a fixed canvas and can
UIKeyboardType is an enumeration.
Typedef enum {
UIKeyboardTypeDefault, // Default type for the current input method.
UIKeyboardTypeASCIICapable, // Displays a keyboard which can enter ASCII characters, non-ASCII keyboards remain
Mysearchbar. H is as follows:
@ Interface mysearchbar: uisearchbar
-(Void) layoutsubviews;
@ End
Mysearchbar. m is as follows:
# Import "mysearchbar. H"
@ Implementation mysearchbar
-(Void) layoutsubviews {
Uitextfield * searchfield;
Nsuinteger
In the above two lectures, we will explain how to get the network status and sock. You may have some knowledge about socket. For more information, see other materials. Next we will introduce
SCNetworkReachability applications. In IOS, The
A singleton is a type. This class can only instantiate an object when it is used for the first time, and directly call this object later (a bit shared ). In the Foundation framework, for example, NSFileManger and NSNotificationCenter, they are
UITapGestureRecognizer and UIPanGestureRecognizer applications:
I. UITapGestureRecognizer application:-(Void) singleOne :( UITapGestureRecognizer *) sender {} // write the action of the event to the function.- (void)singleTwo:(UITapGestureRecognizer
When I encountered this problem during my project today, I shared that this should be only one of the reasons for this error. But also want to record down for your reference, if you also encounter such a problem, at the same time is caused by other
We often need to set UIlabel, UIbutton, and UItextfield fonts during development. UIFont is used at this time. The following describes the usage of UIFont for reference only.
UIFont is used to obtain and set font information. This class provides
NSSet, NSMutableSet, and NSCountedSet classes declare an unordered set of programming interface objects (hashed storage: The storage location in the memory is not continuous ).
The NSArray and NSDictionary classes declare an ordered set of
Since the iPhone 4 supports multiple tasks, we need to carefully handle insufficient memory. If the user runs N software in the background while running our program, the iphone program running on the foreground will easily receive a warning of
This class is mainly used for MFMailComposeViewController. The package is OK.
1.
Modify the corresponding code in the laungh function of the appDelegate class of ios:
[Cpp]ViewPlaincopy
// Set RootViewController to window
If ([[UIDevice
1. NINetworkImageView is the class for downloading images by Nimbus. The class is described as follows:
Overview
A network-enabled image view that consumes minimal amounts of memory.
Intelligently crops and resizes images for optimal memory use
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.