Code Monkey home page Code Monkey logo

sqbuttonimageclick's Introduction

###SQButtonImageClick ####不规则形状按钮点击.


####一、介绍(Introduction) 1.图片都是矩形的,UI给我的不规则的按钮图片也是矩形的,只是不规则形状以外设置为了透明色而已。
enter image description here enter image description here
2.要保证只有图片按钮的不规则区域能响应触摸事件,而重叠区域又互相不影响。

####二、原理(Principle) 1.判断此区域是否透明
2.如果透明,不响应事件
3.具体见SQSectorButton.m中的pointInside方法

####三、使用(Usage) 1.导入我项目中的lib库
#'SQSectorButton.h/m'
#'UIImage+ColorAtPoint.h/m'
2.将你的按钮继承自SQSectorButton、或者将IB中的按钮的class与SQSectorButton关联

sqbuttonimageclick's People

Contributors

lsqiang avatar

Stargazers

 avatar C_wenqing avatar  avatar YanJun avatar Michael.Yang avatar 平 avatar  avatar Keep avatar  avatar Daisuke avatar Moliy_S_Dev avatar ZYC_SFL avatar 周洋 avatar  avatar AME avatar Mason avatar maindek avatar  avatar scau_pdc avatar Megan avatar  avatar  avatar thomas avatar QIMI avatar  avatar 独上兰舟 avatar  avatar

Watchers

James Cloos avatar Michael.Yang avatar  avatar QIMI avatar

sqbuttonimageclick's Issues

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.