IOS development-UIPageControl for paging image carouselPaging-related attributes
As long as the pageEnabled attribute of UIScrollView is set to YES, UIScrollView is divided into multiple independent pages, and the content in it can be displayed by
Simple use of the _ block keyword in IOS
/** 13. _ When is block used? **/
Conclusion: To modify the value of a local variable in a block, use _ block to modify the value.
/** 14. Ask a question: in the block, add an array. Do I need to declare the
Comparison of iOS dates1. dates can be compared to determine the size or equality, or to determine the time interval between two dates. You can use the-timeIntervalSinceDate method to calculate the time difference between two dates.
NSDate * now =
UIView position and size, UIView position and size
CGRectMake is used when setting the frame property value and CGPointMake is used when setting the center property value.
UILabel * label = [[UILabel alloc] initWithFrame: CGRectZero];
//
IOS development class forward reference
In addition to class extension, category also has powerful forward reference capabilities. For some private methods (not in. methods declared in the H file) if we want to use them, some of them use
The property string NSAttributeString and NSString of ios development are converted to each other and contain images.
The following describes how to convert common attribute strings NSAtrributeString and NSString:
1. Replace a common string with
Image rotation, image rotation at any angle
Code:
-(Void) viewDidLoad {[super viewDidLoad]; // Do any additional setup after loading the view. UIImage * image = [UIImage imageNamed: @ "1.jpg"]; NSData * tempData; if (UIImagePNGRepresentation
Ios gets the properties and width of the screen.
1. app size, remove the status bar
CGRect r = [UIScreen mainScreen]. applicationFrame;
R = 320,460
In addition: self. view. bounds. size
2. Screen Size
CGRect rx = [UIScreen mainScreen].
IOS _ 3rd library SDWebImage
1. Add the downloaded source code package of the 3rd-party class library SDWebImage to the project.
2. Go to Build Phases of the project and add all. m files in the source code package to the project.
3. Import the built-
Jump between IOS pages and between ios pages
There are two commonly used methods: navigation and direct jump.
The first method of direct jump is to create a new target page, and then set the page Jump animation to initialize the data on the target
This simple question has always been told by five years of Apple development experience that it is not worth mentioning and there is nothing to mention.
However, today I have made a mistake that is not worth mentioning. For a long time, I think it
Function, first of all to comply with the Protocol, must be implemented
And the initialization method.
Message. You can create class objects.
: []
:]
]
The unchangeable string can be used repeatedly. Generally,
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