Common common methods for IOS (you can focus on Cocoachina and have good recommendations every day)
1. Get the total disk space size
2. Get the amount of free disk space
3. Get the size of a file under the specified path
4. Get the size of all files under the folder
5. Get the first letter of a string (or kanji)
6. Grouping string arrays alphabetically by element
Use the following:
The output results are as follows:
7. Get the current time
8. Calculate the last date distance now how long, such as xx hours ago, xx minutes ago, etc.
Use the following:
The output results are as follows:
9. Determine if the phone number format is correct
10. Determine if the mailbox format is correct
11. Convert hex color to Uicolor object
12. Filter processing of images
13. Blur the image
14. Adjust image saturation, brightness, contrast
15. Create a real-time blur effect View (frosted glass effect)
16. Fullscreen
17. Capture a view to create a picture
18. Capturing a region in a view to create a picture
19. Compress the image to a specified size
20. Compress the image to the specified file size
21. Get the device IP address
The head file needs to be introduced first:
Code:
22. Determine if the string contains spaces
23. Determine if a string contains a string
24. Determine if the string contains Chinese
25. Determine if the string is all numeric
26. Draw dashed Lines
Common common methods for IOS