iOS

iOS 杂谈

2017-08-24  本文已影响7人  sjtupt

页面刷新的时候,会停止动画。

iPhone X 适配

iPhone X 适配

ViewController

Button

[button addTarget:self action:@selector(handler1) forControlEvents:UIControlEventTouchUpInside];
[button addTarget:self action:@selector(handler2) forControlEvents:UIControlEventTouchUpInside];

答案是两个handler都会执行

可以在底层给每个button加一些统一的事件处理,比如点击的时候打点

Position, AnchorPoint

the center and position both represent the location of the anchorPoint relative to the superlayer

Xcode

Objective-C

如下 2 个结构体 SampleA 和 SampleB 在内存上是完全一样的,原因是结构体本身并不带有任何额外的附加信息

struct SampleA {
    int a;
    int b;
    int c;
};
struct SampleB {
    int a;
    struct Part1 {
        int b;
    };
    struct Part2 {
        int c;
    };
};

MongoDB

上一篇下一篇

猜你喜欢

热点阅读