iOS 杂谈

作者: sjtupt | 来源:发表于2017-08-24 10:45 被阅读7次

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

iPhone X 适配

iPhone X 适配

ViewController

  • ViewControllernavigationController是父controllernavigationController

Button

  • 如果给button的同一个事件添加两次handler是什么情况?覆盖还是都能够捕获呢?
[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

  • frame是相对于父视图
  • frame是个虚拟的概念,是可以随着position,anchorPoint而变化
  • 如果改变anchorPointposition是不会变得,所以只能变frame,其实就是将anchorPoint放到position的位置

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

  • brew services start mongodb
  • brew services stop mongodb

相关文章

  • NSTimer CADisplayLink GCD计时器的深入探

    关于NSTimer CADisplayLink GCD计时器的杂谈 ** NSTimer ** iOS中最常用的定...

  • iOS 杂谈

    页面刷新的时候,会停止动画。 iPhone X 适配 iPhone X 适配 ViewController 子Vi...

  • ios杂谈

    NSMutableSet *set=[NSMutableSet new]; NSMutableArray *arr...

  • iOS 杂谈

    字典 字典只能存储对象 key - value 里面存的东西都是键值对 数组 数组里面也只能存储对象 NSNu...

  • iOS 杂谈dyld

    哈罗,大家好好久没有更新iOS专栏的内容了,今天想与大家聊一聊iOS的dyld的内容,想用杂谈的形式与大家侃侃分享...

  • iOS线程杂谈

    iOS中的多线程技术主要有NSThread, GCD和NSOperation: 串行: 串行队列一次只能执行一个任...

  • iOS 架构杂谈

    一. 开篇 1. 一句话概括客户端其实大部分都在干些什么事情? 简单来说就是调用 API,展示页面,然后跳转到别的...

  • iOS开发杂谈

    已经从事iOS开发很多年了,想要继续往前走,无非是拥有精湛的技术。精湛技术的标准是,iOS知识从广度和深度都有所涉...

  • iOS-杂谈

    一.看看你是什么级别的? 初级:会用,需要掌握oc语言、UIKit、网络传输、第三方库初级iOS工程师 中级:为什...

  • 创业杂谈--AR App竞品分析

    前序 创业杂谈--起由 创业杂谈--创业方向 创业杂谈--创业团队 那么这篇我们来看看AR App竞品。 在App...

网友评论

    本文标题:iOS 杂谈

    本文链接:https://www.haomeiwen.com/subject/mdisdxtx.html