1. Use UIImagePickerController to capture the media and create a viewfinder
UIImagePickerController is a subclass of UINavigationController, which is part of UIKit. Therefore, you do not need to add additional frameworks. It is easy to use, but
IOS control albumUITextView Control
1. Create and initialize
Create a UITextView file and write the following code in the. h file:// ================================================ ==========================================================
# Import
1. Adapt to 4 inch screen adaptation. To adapt to the 4 inch screen, the system creates a default-568h@2x.png image and identifies whether the system supports the 4 inch screen based on the resource. As for other resources, xxx-568h.jpg is not
IOS's view does not have the click function, which is a big difference with Android. There is no way to customize it. I originally wanted to write it myself. I visited github and found that some of my colleagues have already written it, I don't need
In the development project process, we need to use some data on the Internet in many cases. In this case, we may need to write a crawler to crawl the data we need. Generally, regular expressions are used to match Html to obtain the required data.
Use UILabel to display static text to show users static text and control the font and color of text. @ Property (nonatomic, strong) UILabel * myLabel; @ synthesize myLabel;-(void) viewDidLoad {[super viewDidLoad]; self. view. backgroundColor =
In the process of image processing, we often encounter image scaling requirements. In the past, we used a pinch gesture to scale the Image view, below is a brief introduction to the image scaling function provided by scrollView: first, implement the
1. determine whether an element BOOLisValue = [keyArray containsObject: Q "aaa"] exists in the array. 2. Separate the strings by commas and save them to the array: NSArray * keyArray = [[NSArray alloc] init]; keyArray = [@ "winter melon, watermelon,
3. MapView-click the city button. A list of available cities is displayed, but it is not reflected when you click the city button. There are no warnings or errors in the program. How can I find this problem? The best way is to use the logic
Now I want to define a UIButton. This button has two images. One is the background image and the other is the image 1. I set the background image through setBackgroundImage and use setImage to set the display image, but because the image is larger
The capture screen CALayer instance uses the renderInContext method of Core Graphics to draw a View to the image context to convert it to another UIImage instance. Prerequisite # import + (UIImage *) imageFromView: (UIView *) theView {// draw a view'
NSDateFormatter class is required.
1. Convert string to date
[Plain]NSDateFormatter * dateFormat = [[NSDateFormatter alloc] init]; // instantiate an NSDateFormatter object[DateFormat setDateFormat: @ "yyyy-MM-dd HH: mm: ss"]; // set the time format.
Generally, the following error message is displayed: 'reta' is unavailable: not available inautomatic reference counting mode.
Literally, arc prohibits the display of retain messages.
In fact, after using ARC, you are not allowed to directly
1 PrefaceUIDatePicker is a class that is very similar to UIPickerView and is very common. Let's take a look at it today.
2 UIDatePicker IntroductionCode onDate selection:. H file:[Plain]@ Property (nonatomic, strong) UIDatePicker * myDatePicker;
@
1 PrefaceIt is difficult to control the size of images displayed to users.
2. code exampleZYViewController. m:
[Plain]@ Synthesize myImageView; -(Void) viewDidLoad{[Super viewDidLoad];// Do any additional setup after loading the view, typically from
1 PrefaceThe dataWithJSONObject: options: error: Method of the NSJSONSerialization class is used for implementation. Array and dictionary are serialized into JSON objects. It facilitates transmission over the network.
2. code exampleTestDemo.
If you want to call a method of a class, you can write this method from the NSObject class.
C code example mselector:PerformSelector: withObject:PerformSelector: withObject:
Actual call
C code [self defined mselector: @ selector (displayViews)
Description:
ASIHttpRequest is a method used to apply a third-party library. It uses code quickly to reduce the amount of code and improve efficiency. preparation:
I. Import a third-party library ASIHttpRequest
2. Many errors will be reported for
Anyone who has worked on mobile development knows that list controls are one of the most commonly used controls. The list control in iOS is UITableView. In fact, Apple developers are well-designed for UITableView (easy to use and highly scalable ).
To save traffic and improve user experience, many applications currently use the local cache mechanism. Among them, Netease news provides the best caching function. My own applications also want to add the local cache function, so I checked 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.
A Free Trial That Lets You Build Big!
Start building with 50+ products and up to 12 months usage for Elastic Compute Service