Skip to content

Commit

Permalink
0.1.7
Browse files Browse the repository at this point in the history
Swift 4.2 적용
  • Loading branch information
ShockUtility committed Nov 26, 2018
1 parent 8b49ab4 commit 1dc821f
Show file tree
Hide file tree
Showing 6 changed files with 14 additions and 14 deletions.
4 changes: 2 additions & 2 deletions Example/SmartAd.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -235,12 +235,12 @@
);
inputPaths = (
"${SRCROOT}/Pods/Target Support Files/Pods-SmartAd_Example/Pods-SmartAd_Example-frameworks.sh",
"${BUILT_PRODUCTS_DIR}/GoogleToolboxForMac/GoogleToolboxForMac.framework",
"${BUILT_PRODUCTS_DIR}/GoogleUtilities/GoogleUtilities.framework",
"${BUILT_PRODUCTS_DIR}/nanopb/nanopb.framework",
);
name = "[CP] Embed Pods Frameworks";
outputPaths = (
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/GoogleToolboxForMac.framework",
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/GoogleUtilities.framework",
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/nanopb.framework",
);
runOnlyForDeploymentPostprocessing = 0;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<Scheme
LastUpgradeVersion = "0930"
LastUpgradeVersion = "1010"
version = "1.3">
<BuildAction
parallelizeBuildables = "YES"
Expand Down
2 changes: 1 addition & 1 deletion SmartAd.podspec
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@

Pod::Spec.new do |s|
s.name = 'SmartAd'
s.version = '0.1.5'
s.version = '0.1.7'
s.summary = 'SmartAd is an easy-to-use library for Google AdMob and Facebook advertising frameworks.'
s.description = <<-DESC
SmartAd is an easy-to-use library for AdMob and Audience Network advertising frameworks on iOS and Android.
Expand Down
2 changes: 1 addition & 1 deletion SmartAd/Classes/LayoutOperator.swift
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ public func |-|(view: UIView, rhs:(format:String, views:[Any])) {

view.addConstraints(NSLayoutConstraint.constraints(
withVisualFormat: rhs.format,
options: NSLayoutFormatOptions(rawValue: 0),
options: NSLayoutConstraint.FormatOptions(rawValue: 0),
metrics: nil,
views: views))
}
Expand Down
2 changes: 1 addition & 1 deletion SmartAd/Classes/SmartAd.swift
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ open class SmartAd: NSObject {

// 광고를 실행하거나 막기 위해서 커스텀 평션을 만들어서 붙여줄 수 있다
// 예) 광고 구매 인앱을 결제한 경우 다음 함수를 대입해 주면 광고가 차단된다.
open static var IsShowAdFunc: (() -> (validClasses:[AnyClass], isShow: Bool))?
public static var IsShowAdFunc: (() -> (validClasses:[AnyClass], isShow: Bool))?
open class func IsShowAd(_ owner: AnyObject) -> Bool {
if let ret = IsShowAdFunc?() { // 함수가 존재한다.
if ret.validClasses.contains(where: { owner.classForCoder == $0 }) { // 적용 클래스에 포함되어 있다면
Expand Down
16 changes: 8 additions & 8 deletions SmartAd/Classes/UIAlertController+.swift
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,9 @@ public extension UIAlertController {
// 로딩 얼럿
@discardableResult
class func ad_loading(_ controller: UIViewController,
loadingStyle: UIActivityIndicatorViewStyle,
title: String? = NSLocalizedString("Loading", comment: ""),
completed: ((_ alert: UIAlertController) -> Void)?) -> UIAlertController
loadingStyle: UIActivityIndicatorView.Style,
title: String? = NSLocalizedString("Loading", comment: ""),
completed: ((_ alert: UIAlertController) -> Void)?) -> UIAlertController
{
let alert = UIAlertController(title: title, message: nil, preferredStyle: .alert)
alert.addLoadingView(loadingStyle: loadingStyle)
Expand All @@ -30,16 +30,16 @@ public extension UIAlertController {
}

// 로딩 뷰를 추가해 준다
fileprivate func addLoadingView(loadingStyle: UIActivityIndicatorViewStyle, viewHeight:CGFloat = 100, yPositon:CGFloat = 1.4) {
fileprivate func addLoadingView(loadingStyle: UIActivityIndicatorView.Style, viewHeight:CGFloat = 100, yPositon:CGFloat = 1.4) {
// 얼럿 높이 수정
let height: NSLayoutConstraint = NSLayoutConstraint(item: self.view, attribute: NSLayoutAttribute.height,
relatedBy: NSLayoutRelation.equal,
toItem: nil, attribute: NSLayoutAttribute.notAnAttribute,
let height: NSLayoutConstraint = NSLayoutConstraint(item: self.view, attribute: NSLayoutConstraint.Attribute.height,
relatedBy: NSLayoutConstraint.Relation.equal,
toItem: nil, attribute: NSLayoutConstraint.Attribute.notAnAttribute,
multiplier: 1, constant: viewHeight)
self.view.addConstraint(height)

// 인디케이터 추가
let activityIndicator = UIActivityIndicatorView(activityIndicatorStyle: loadingStyle)
let activityIndicator = UIActivityIndicatorView(style: loadingStyle)
activityIndicator.translatesAutoresizingMaskIntoConstraints = false
activityIndicator.tag = 999
self.view.addSubview(activityIndicator)
Expand Down

0 comments on commit 1dc821f

Please sign in to comment.