文件系统与日期时间处理详解
1. 文件系统与缓存应用
在iOS开发中,文件系统操作和缓存管理是常见的需求。下面介绍一个iOS单视图应用示例,它展示了如何使用 NSCache 来缓存图片资源,以及在不同内存情况下的处理方式。
1.1 代码实现
- AppDelegate.h
#import <UIKit/UIKit.h>
@class ViewController;
@interface AppDelegate : UIResponder <UIApplicationDelegate>
@property (strong, nonatomic) UIWindow *window;
@property (strong, nonatomic) ViewController *viewController;
@end
- AppDelegate.m
#import "AppDelegate.h"
#import "ViewController.h"
@implementation AppDelegate
@synthesize window = _window;
@synthesize viewController = _viewController;
- (BOOL)application:(UIApplicatio
超级会员免费看
订阅专栏 解锁全文
4517

被折叠的 条评论
为什么被折叠?



