InappAlert 0.1.6

InappAlert 0.1.6

LimHG维护。



  • LimHG

InappAlert

CI Status Version License Platform

示例

要运行示例项目,请克隆仓库,然后在 Example 目录中首先运行 pod install

需求

安装

InappAlert 通过 CocoaPods 提供。要安装它,只需将以下行添加到 Podfile 中即可

pod 'InappAlert'

如何使用

  1. 启动Processing Alert界面时,创建并初始化InappAlert对象
// InappAlert Class import
import InappAlert

// InappAlert 변수 선언
var inappAlert : InappAlert? = nil

// viewDidLoad  InappCustom 변수 초기화
self.inappAlert = InappAlert(self)
  1. 指定同时显示的文本内容
// 인앱결제 상태를 Processing Alert으로 보이고자  경우
// IAmessageChange 함수를 이용하여 문자를 넣어 준다. 
let Msg: String = "결제를 진행 중입니다."
if let IA = self.inappAlert {
    IA.IAmessageChange(startRestoreMsg)
}
  1. 如何在正在进行中的运算和处理完毕后,关闭Processing Alert
// 단순히 Processing Alert를 종료하려면 IAdismiss 함수를 호출한다. 
// - 해당 함수 호출  InappAlert 내부에서 사용하는 UIAlertController 객체는 자동으로 nil 처리 진행
if let IA = self.inappAlert {
    IA.IAdismiss()
}


// Processing Alert의 종료가  시점에서 다른 작업을 하고자  경우 IAdismiss의 completion을 이용한다.
// 이때 InappAlert 클래스  alertController에 대해서는 명시적으로 nil을 넣어준다.
if let IA = self.inappAlert {
    IA.IAdismiss {
        IA.alertController = nil
        
        // 종료  실행할 로직 입력
    }
}

作者

LimHG, [email protected]

许可

InappAlert按照MIT许可协议提供。更多信息请参阅LICENSE文件。