Git Product home page Git Product logo

authordemo's Introduction

AuthorDemo

方便植入到自己创建的应用中的作者彩蛋

介绍

目前的方式是,对着界面连击7次,弹出一个Alert显示内容。很简单,但是相应的也很方便,随拷随用。希望以后技术成长了能做出更炫酷又简单的效果来吧~

效果图

使用方法

直接将以下代码复制到应用的某个界面:

// 获取view点击事件
-(void)touchesEnded:(NSSet *)touches withEvent:(UIEvent *)event
{
    for (UITouch *aTouch in touches) {
        // 判断点击7次后执行
        if (aTouch.tapCount > 6 && aTouch.tapCount < 8) {
            UIAlertView *alert = [[UIAlertView alloc] initWithTitle:@"" message:@"Hello Cloudox" delegate:self cancelButtonTitle:nil otherButtonTitles:@"确定",nil];
            [alert show];
        }
    }
}

这样在这个界面连击7次,就会弹出Alert了,如果不对tapCount的上限做限制,那么每多点击一次都会执行一次,我们还是只执行一次比较好。
一般放在应用的关于界面比较好,基本应用都会有关于界面,而关于界面的UI元素又比较少,不会影响到应用本身的使用。

authordemo's People

Contributors

cloudox avatar

Watchers

 avatar  avatar

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.