GLInAppPurchase 1.1.3

GLInAppPurchase 1.1.3

测试已测试
语言语言 SwiftSwift
许可证 MIT
发布日期最后发布日期2017年4月
SwiftSwift版本3.1
SPM支持SPM

gokul维护。



  • gokulgovind

overView overView overView overView

提示:使用 tag0.1.2 用于 swift 2.2

示例

要运行示例项目,首先要克隆仓库,然后从 Example 目录中运行 pod install。支持 ObjectiveC、Swift 2 和 Swift 3.0

要求

安装

手册

将文件 GLInAppPurchaseUI.swiftGLInAppPurchaseUI.xib 从 ~/GLNotificationBar/GLNotificationBar/Classes 复制到您的项目中。

pod "GLInAppPurchase"

用户指南

Swift

let appBanner = GLInAppPurchaseUI(title: "Skip The Line", subTitle: "Be first in the queue", bannerBackGroundStyle: .TransparentStyle)

//Add image and Discription
appBanner.displayContent(imageSetWithDescription:
[
UIImage(named:"IMG_1")!:"Rewind Your Last Swipe##Go back and swipe again",
UIImage(named:"IMG_2")!:"",
UIImage(named:"IMG_3")!:"Send More Super Likes##Let them know you are interested",
])

//Add Button Action
appBanner.addAction(GLInAppAction(title: "10", subTitle: "Boosts", price: "₹155.00/ea", handler: { (actin) in
print("Completion handler called \(actin.actionSubTitle) Boost For \(actin.actionPrice)")
}))
appBanner.addAction(GLInAppAction(title: "5", subTitle: "Boosts", price: "₹184.00/ea", handler: { (action) in
print("Completion handler called \(action.actionSubTitle) Boost For \(action.actionPrice)")
}))

appBanner.addAction(GLInAppAction(title: "1", subTitle: "Boosts", price: "₹250.00/ea", handler: { (action) in
print("Completion handler called \(action.actionSubTitle) Boost For \(action.actionPrice)")
}))

//Button & Background Theme
appBanner.setBannerTheme([UIColor.whiteColor()], headerTextColor: UIColor.blackColor())
appBanner.setButtomTheme([UIColor.blueColor(),UIColor(netHex:0x2375F8)], buttonTextColor: UIColor.whiteColor())

//Set Okay and Cancel Button Title
appBanner.addButtonWith("BOOST ME", cancelTitle: "NO, THANKS") { (str) in
print(str)
if str == "NO, THANKS" {
}
appBanner.dismissBanner()
self.showSimpleAlert("\(str) Button Clicked")
}

appBanner.presentBanner()

作者

gokulgovind, [email protected]

许可证

GLInAppPurchase 可在 MIT 许可证下获取。更多信息请参阅 LICENSE 文件。