Giter VIP home page Giter VIP logo

zxdrawprize's Introduction

iOS Lottery

About Draw

centerRadius = 0 centerRadius = 30
T1 T2

中间有 指针 图标覆盖,所以在显示上没啥区别

GIF

GIF
T1

IMG

3 6 8 20
3 6 8 20

Init

drawPrizeView = ZXDrawPrizeView.init(CGPoint(x: 100, y: 100), width: 400)
self.view.addSubview(drawPrizeView)
drawPrizeView.delegate = self
drawPrizeView.dataSource = self

DataSouce

///奖品格子数量
func numberOfPrize(for drawprizeView: ZXDrawPrizeView) -> NSInteger
///商品图片(包括谢谢参与)
//本地图片(二选一 优先)
func zxDrawPrize(prizeView: ZXDrawPrizeView, imageAt index: NSInteger) -> UIImage?
//网络图片(二选一)
func zxDrawPrize(prizeView: ZXDrawPrizeView, imageUrlAt index: NSInteger) -> String?
///某项奖品抽完
func zxDrawPrize(prizeView: ZXDrawPrizeView, drawOutAt index: NSInteger) -> Bool
///点击抽奖按钮
func zxDrawPrizeButtonImage(prizeView: ZXDrawPrizeView) -> UIImage
///大背景
func zxDrawPrizeBackgroundImage(prizeView: ZXDrawPrizeView) -> UIImage?
///滚动背景
func zxDrawPrizeScrollBackgroundImage(prizeView: ZXDrawPrizeView) -> UIImage?

Delegate

///点击抽奖按钮
func zxDrawPrizeStartAction(prizeView: ZXDrawPrizeView)
///抽奖结束
func zxDrawPrizeEndAction(prizeView: ZXDrawPrizeView, prize index: NSInteger)

RUN

execute `pod install` in `Terminal` ,before run demo project.
  • If Copy,Pls Keep The Writer Info.

zxdrawprize's People

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

Forkers

aidybao bogon

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.