GithubHelp home page GithubHelp logo

articles's People

Contributors

leesen11 avatar

Watchers

 avatar  avatar

articles's Issues

事件传递:响应链

当我们在设计应用的时候,很可能希望应用可以对事件做出动态响应。比如,一个触摸可能会发生在屏幕上不同的对象上,我们需要决定让哪个对象来对指定的事件作出响应,并且理解这个对象是如何接收这个事件的。
当发生了一个由用户生成的事件时,UIKit创建一个包含处理这个事件所需信息的event对象,之后它会将这个event对象放到当前活跃的app的事件队列中。对于touch事件,这个event对象是一个一系列touch集合的UIEvent对象。对于motion事件,这个事件由我们所使用的框架和我们想要处理的motion事件类型而决定。
event会沿着特定的路径进行传递,直到它被传送到可以处理它的对象那里。首先,UIApplication单例对象会从最顶层的队列中接收事件,然后将其分发下去以便对其进行处理。

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.