Skip to content

Commit

Permalink
add image
Browse files Browse the repository at this point in the history
  • Loading branch information
spf-iOS committed Sep 10, 2017
1 parent 9b93834 commit 78e0f94
Show file tree
Hide file tree
Showing 2 changed files with 28 additions and 1 deletion.
2 changes: 1 addition & 1 deletion MGProgressHUD.podspec
Expand Up @@ -16,7 +16,7 @@ Pod::Spec.new do |s|
#

s.name = "MGProgressHUD"
s.version = "2.1.12"
s.version = "2.1.13"
s.summary = "蘑菇租房正在使用的ProgressHUD。"

# This description is used to generate tags and improve search results.
Expand Down
27 changes: 27 additions & 0 deletions MGProgressHUD/Classes/MGProgressHUD_extension.swift
Expand Up @@ -9,6 +9,33 @@
import UIKit

public extension MGProgressHUD {
@available(*, deprecated:2.1.11, message:"不推荐使用,请使用iconImage:UIImage")
@discardableResult
public class func showView(_ toView:UIView?,
icons:[String]?,
message:String?,
messageColor:UIColor?,
showBgView:Bool?,
detailText:String?,
detailColor:UIColor?,
loationMode:MGLocationMode?) -> MGProgressHUD?{

var iconImages: [UIImage]?
if let `icons` = icons {
iconImages = icons.flatMap({ (imageName) -> UIImage? in
return UIImage(named: imageName)
})
}

return showView(toView,
iconImages: iconImages,
message: message,
messageColor: messageColor,
showBgView: showBgView,
detailText: detailText,
detailColor: detailColor,
loationMode: loationMode)
}

@available(*, deprecated:2.1.11, message:"不推荐使用,请使用iconImage:UIImage")
@discardableResult
Expand Down

0 comments on commit 78e0f94

Please sign in to comment.