Knowledge point:
(1) Image View Control
The current method is pokerImage. image = [UIImage imageNamed: @”picturename.png "];
Note: + (UIImage *) imageNamed :( NSString *) name
This method is used to search for images with supplied names in the top-level folder of application bundle. If you find the image, load it to the iPhone system to cache the image. This means that the image is (theoretically) stored in the memory as a cache, which is directly referenced to the system memory during use. If you have more images, the image cache may not respond. When using Interface Builder to create an Interface, If you directly drag UIImageView and set the image name. InterfaceBuilder uses the imageName method of the UIImage class to load images. The image is cached, resulting in large memory usage. And it cannot be released, even if the release drops UIImageView, it will not help.
Recommended:
NSString * path = [[NSBundle mainBundle] pathForResource: @ "icon" ofType: @ "png"];
MyImage = [UIImage imageWithContentsOfFile: path];
(2) Alert View Control
UIAlertView is the prompt box "class" in the UIView framework. The Code is as follows:
Note: Under the ARC mechanism, you do not need to add the release object statement.
(3) Save the time value NSDate
NSDate is the timer "class" in the Foundation framework. It is used to save the time value in OC.
+ (Id) date;
Returns the current time.
+ (Id) dateWithTimeIntervalSinceNow :( NSTimeInterval) secs;
The return value is based on the current time, and the time after secs seconds is passed.