摘要:
1 - (void)viewDidLoad 2 3 { 4 5 [super viewDidLoad]; 6 7 // Do any additional setup after loading the view. 8 9 10 11 // 滚动视图 12 13 UIScrollView *scro... 阅读全文
摘要:
1 DrawRect 2 3 - (void)drawRect:(CGRect)rect 4 5 { 6 7 // Drawing code 8 9 // 当前视图绘制信息 10 11 CGContextRef context = UIGraphicsGetCurrentContext(); 12 13 // 设置线条的宽度 14 ... 阅读全文
摘要:
/// 手势识别器 // 1. 轻拍手势 // 手势需要在定义是绑定一个触发方法(SEL) // UITapGestureRecognizer *tap = [[UITapGestureRecognizer alloc] initWithTarget:self action:@selector(ta 阅读全文
摘要:
1 #import "MainViewController.h" 2 3 @interface MainViewController () 4 // 延展 :管理类私有的属性和方法 5 @end 6 7 @implementation MainViewController 8 // 指派初始化方法 9 - (id)initWithNibName:(NSString *)ni... 阅读全文
摘要:
1 #import "TestDicAppDelegate.h" 2 3 @implementation TestDicAppDelegate 4 5 - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions ... 阅读全文
摘要:
1 NSString *filePath = @"/Users/dlios/Downloads/area.txt"; 2 NSError *error = nil; 3 NSString *buffer = [NSString stringWithContentsOfFile:filePath encoding:NSUTF8StringEncoding error:&err... 阅读全文