![](https://img-blog.csdnimg.cn/20201014180756928.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
Objective-C
发烧的小龙虾
BUAAer
展开
-
OC:块
1. 块初体验 #include <stdio.h> void func(int (^block)(int, int)) { int v = block(10, 20); printf("%d\n", v); } int main() { int (^b)(int, int) = ^(int x, int y) { return x + ...原创 2018-12-12 14:20:00 · 202 阅读 · 0 评论 -
OC:继承和多态碰到的坑
今天(2018.12.5)算是正式开始学OC了,加油! #import <UIKit/UIKit.h> #import "AppDelegate.h" @interface A : NSObject - (void) whoAreYou; @end @implementation A - (void) whoAreYou { printf("AAA\n"); } @e...原创 2018-12-11 16:58:44 · 214 阅读 · 0 评论 -
KVO初体验:ScrollView上下联动
// // ViewController.m // OCPrograming // // Created by zhoushijie on 2018/12/10. // Copyright © 2018 zhoushijie. All rights reserved. // #import "ViewController1.h" #define screenWidth UISc...原创 2019-01-11 12:45:05 · 422 阅读 · 0 评论