Common iOS categories
I found that I gradually accumulated a lot of Categories I wrote .. Today, we are not selfish. All posted
1. NSDateFomatter
@interface NSDateFormatter (MyCategory)+ (id)dateFormatter;+ (id)dateFormatterWithFormat:(NSString
IOS Development Series-Comprehensive Analysis of drawing and filterThe commonly used Z 2D drawing frame in iOS is Quartz 2D. Quartz 2D is part of the Core Graphics Framework and is a powerful Two-Dimensional Image Rendering Engine. Quartz 2D is well
Explore the impact of sdks of different versions on iOS programs The same Code is compiled using sdks of different versions, which affects the values in the MachO header, so that the program shows different appearances.Code:
-
Modify the title of rightBarButtonItem of UINavigationController1. Initialization
In viewDidLoad, add the button named "add partition" for navigationItem
-(Void) viewDidLoad {[super viewDidLoad]; // Do any additional setup after loading the view.
IOS UIPickView + sqlite select all cities in China1. Case Description: by reading files, all Chinese cities are written into the sqlite database. Now UIPickView is used to select all Chinese cities, as shown below:2. City Object Model
//// CityModel.
Solution for switching between the receiver and speaker for iOS voice playback
[[UIDevice currentDevice] setProximityMonitoringEnAbled: YES]; // we recommend that you set yes before playing, and NO before playing. This function enables infrared
IOS _ Custom Glass Effect
Finally:
Key code:
UIImage classification code
/// UIImage + BlurGlass. h // handsome guy _ buy /// Created by beyond on 14-8-30. // Copyright (c) 2014 com. beyond. all rights reserved. // category of glass
Implementation of a graphic exhibition in iOS
On the homepage of an app, there are usually graphic exhibitions used to display advertisements or headlines. Typical is Netease's news Client
The location of the red box is a typical image
IOS_28 imitation QQ space login and exit
The final result is as follows:
Note:
Signature + signature/weight + CjxwPjxzdHJvbmc + weight/ydLU1Nq0 + weight/weight + CjxwPjxzdHJvbmc + weight + Weight = "http://www.2cto.com/uploadfile/Collfiles/2
Questions about iOS development (6)
61. Warning "addexplicit braces to avoid dangling else"
The so-called "Dangerous else" is code similar to this:
If (a = 10)
Printf ("TEN ");
Else
Printf ("not ten ");
A = 100;
The compiler thinks that your else
IOS _ Multithreading
Apple's Cocoa framework supports multiple threads, including NSThread, GCD, and NSOperation.
NSThread: it is officially recommended and the most basic thread creation method, but you need to develop this method to manage the
[IOS] Objective-C simple but not simple Singleton mode, iosobjective-c
A series of problems occurred some days ago due to misuse of Singleton in the project. Originally, the singleton in objective-c is not as simple as java or C #. Here we record it;
Use NSDate, nsdate
1. Convert string time to NSDate and print
1 NSString * string = @ "2013-08-12 20:13:43"; 2 3 NSDateFormatter * formatter = [[NSDateFormatter alloc] init]; 4 // The format must be consistent; otherwise, 5 formatter cannot be
Those who do not regret it: iOS development series -- view switching (1)
The principle of switching between the three views of iOS is different:
UITabBarController: Manages views in a parallel manner. The relationship between views is usually not
Ios7.0 combined with storyborad to achieve page Jump summary, ios7.0storyborad
After a whole day of hard work, This article summarizes the ios7.0 page Jump-related content.Stored rule
I am very late with ios, and the Environment is already xcode5 +
The iOS double type is unstable and the solution is as follows !, Iosdouble
The current app has appeared. We will share some of the above-mentioned image bugs and try to solve them and pay attention to them!
Code with the problem:
NSString, nsstring
Example 1:
NSString * str1 = @ "hello world"; // in oc, NSString is used to represent a string
NSLog (@ "% @", str1); // % @ indicates the object format in oc.
Example 2:
Int a = 5;
NSString * str2 = [NSString
PerformSelector in iOS multithreading: different from dispatch_time
Timer-related latency calls in iOS, which are common in NSObjectOptional mselector: withObject: afterDelay:When this method is called, it will set the timer in the current runloop.
The second OC class and the second oc class
Example:
Creates a class, creates an object, calls a method, and changes the attribute value.
// Declare the class
@ Interface Person: NSObject
{
@ Public // make it possible to call member variables
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