文章来源:淘论文网   发布者: 毕业设计   浏览量: 62



还可以点击去查询以下关键词:
[InAppPurchase]    [毕业]    [Button]    [购买]    [按钮]    [InAppPurchase毕业Button 购买按钮]   

项目介绍:

https://github.com/PGSSoft/InAppPurchaseButton

InAppPurchaseButton

A simple and customisable in-app purchase button, written in Swift.

一个简单和可定制的应用内购买按钮,论文开题报告,用Swift编写。

Installation

The most convenient way to install it is by using Cocoapods with Podfile:

pod 'InAppPurchaseButton'

or using Carthage and add a line to Cartfile:

github 'PGSSoft/InAppPurchaseButton'Requirements

iOS 8.4

Usageimport InAppPurchaseButtonAdding control

Open your storyboard or xib and drag and drop UIButton control.
Change custom class to InAppPurchaseButton.

Adding constraints

Add constrains, but bear in mind that InAppPurchaseButton changes intrinsic content size by itself, so adding constrains like height or width will cause unexpected behaviour.
If you want to control size of InAppPurchaseButton, take a look at minExpandedSize and prefferedTitleMargins properties.

Available states

InAppPurchaseButton might have following states:

regular (active for purchased item or inactive for not purchased item) - use it to display text like Open (active) or Buy (for inactive)

Example:

button.buttonState = .regular(animate: true, intermediateState: .active)

busy - intermediate state between regular and downloading, usually used when application is waiting for something (e.g. response from the server)

Example:

button.buttonState = .busy(animate: true)

downloading - showing current progress

Example

button.buttonState = .downloading(progress: 0.25)Configurable properties:

minExpandedSize - minimum size for expanded state

prefferedTitleMargins - preferred space between text and edges

borderColorForInactiveState - border color for inactive state

borderColorForActiveState - border color for active state

backgroundColorForInactiveState - fill color of the button in inactive state

backgroundColorForActiveState - fill color of the button in active state

imageForInactiveState - stretchable background image of the button in inactive state

imageForActiveState - stretchable background image of the button in active state

widthForBusyView - diameter of the button in case when indicator view is shown

cornerRadiusForExpandedBorder - corner radius of the border during transition from .regular to .busy state

borderWidthForBusyView - border width for .busy state

borderWidthForProgressView - border width for .downloading state

ringColorForProgressView - color of the ring for .downloading state

attributedTextForProgressView - attributed string for .downloading state

indicatorImageForProgressMode - alternatively it is possible to display image for .downloading state

transitionAnimationDuration - the speed for all transition animations

shouldAlwaysDisplayBorder - indicates whether border for .active or .inactive should be visible all the time or only during transition (false by default)

attributedTextForInactiveState - attributed string for .inactive state

attributedTextForActiveState attributed string for .active state

For more information, please check InAppPurchaseButton.swift documentation and examples


这里还有:


还可以点击去查询:
[InAppPurchase]    [毕业]    [Button]    [购买]    [按钮]    [InAppPurchase毕业Button 购买按钮]   

请扫码加微信 微信号:sj52abcd


下载地址: http://www.taolw.com/down/8770.docx
  • 上一篇:【Swift】定制Interpolate
  • 下一篇:iOS 抽屉菜单 SliderBar框架 Swift版本的实现