Skip to content

Commit

Permalink
3.1.0
Browse files Browse the repository at this point in the history
  • Loading branch information
choiceyou committed Nov 2, 2018
1 parent 9647873 commit 752b793
Show file tree
Hide file tree
Showing 11 changed files with 488 additions and 14 deletions.
4 changes: 2 additions & 2 deletions FWPopupView/FWPopupView.podspec
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ Pod::Spec.new do |s|
#

s.name = "FWPopupView"
s.version = "3.0.9"
s.version = "3.1.0"
s.summary = "自定义弹窗"

# This description is used to generate tags and improve search results.
Expand Down Expand Up @@ -107,7 +107,7 @@ Pod::Spec.new do |s|
#

# s.resource = "icon.png"
# s.resources = "Resources/*.png"
s.resources = "FWPopupView/FWPopupView/FWPopupView/Resources/FWPopupView.bundle"

# s.preserve_paths = "FilesToSave", "MoreFilesToSave"

Expand Down
16 changes: 16 additions & 0 deletions FWPopupView/FWPopupView.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,9 @@
objects = {

/* Begin PBXBuildFile section */
4904E178218AE8C50014A6E3 /* FWCustomSheetView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4904E177218AE8C50014A6E3 /* FWCustomSheetView.swift */; };
49089B94216DA23B00683B2F /* FWRadioButton.swift in Sources */ = {isa = PBXBuildFile; fileRef = 49089B93216DA23B00683B2F /* FWRadioButton.swift */; };
49118B29218BD77C006E6460 /* FWPopupView.bundle in Resources */ = {isa = PBXBuildFile; fileRef = 49118B28218BD77C006E6460 /* FWPopupView.bundle */; };
491A970D20AFCD17006E3D70 /* FWMenuView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 491A970C20AFCD17006E3D70 /* FWMenuView.swift */; };
493BE226206A322B00E5EF80 /* FWDateView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 493BE225206A322B00E5EF80 /* FWDateView.swift */; };
49552D3D20B56C24000A1FA6 /* FWCustomPopupView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 49552D3C20B56C24000A1FA6 /* FWCustomPopupView.swift */; };
Expand Down Expand Up @@ -46,7 +48,9 @@
/* End PBXContainerItemProxy section */

/* Begin PBXFileReference section */
4904E177218AE8C50014A6E3 /* FWCustomSheetView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = FWCustomSheetView.swift; sourceTree = "<group>"; };
49089B93216DA23B00683B2F /* FWRadioButton.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = FWRadioButton.swift; sourceTree = "<group>"; };
49118B28218BD77C006E6460 /* FWPopupView.bundle */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.plug-in"; path = FWPopupView.bundle; sourceTree = "<group>"; };
491A970C20AFCD17006E3D70 /* FWMenuView.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = FWMenuView.swift; sourceTree = "<group>"; };
493BE225206A322B00E5EF80 /* FWDateView.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = FWDateView.swift; sourceTree = "<group>"; };
49552D3C20B56C24000A1FA6 /* FWCustomPopupView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = FWCustomPopupView.swift; sourceTree = "<group>"; };
Expand Down Expand Up @@ -98,6 +102,14 @@
/* End PBXFrameworksBuildPhase section */

/* Begin PBXGroup section */
49118B27218BD741006E6460 /* Resources */ = {
isa = PBXGroup;
children = (
49118B28218BD77C006E6460 /* FWPopupView.bundle */,
);
path = Resources;
sourceTree = "<group>";
};
49812D6B205F915600639DDC = {
isa = PBXGroup;
children = (
Expand Down Expand Up @@ -156,6 +168,7 @@
49812DA5205F916F00639DDC /* FWPopupView */ = {
isa = PBXGroup;
children = (
49118B27218BD741006E6460 /* Resources */,
49812DA6205F91F100639DDC /* FWPopupView.swift */,
49812DA8205F94CF00639DDC /* FWPopupWindow.swift */,
49BB210E2060B86A00E0DE6E /* FWPopupCategory.swift */,
Expand All @@ -165,6 +178,7 @@
491A970C20AFCD17006E3D70 /* FWMenuView.swift */,
493BE225206A322B00E5EF80 /* FWDateView.swift */,
49089B93216DA23B00683B2F /* FWRadioButton.swift */,
4904E177218AE8C50014A6E3 /* FWCustomSheetView.swift */,
);
path = FWPopupView;
sourceTree = "<group>";
Expand Down Expand Up @@ -276,6 +290,7 @@
isa = PBXResourcesBuildPhase;
buildActionMask = 2147483647;
files = (
49118B29218BD77C006E6460 /* FWPopupView.bundle in Resources */,
49812D82205F915600639DDC /* LaunchScreen.storyboard in Resources */,
49812D7F205F915600639DDC /* Assets.xcassets in Resources */,
);
Expand Down Expand Up @@ -316,6 +331,7 @@
493BE226206A322B00E5EF80 /* FWDateView.swift in Sources */,
495AC1052068C900002773F9 /* FWSheetView.swift in Sources */,
495AC10120688B3B002773F9 /* FWDemoViewController.swift in Sources */,
4904E178218AE8C50014A6E3 /* FWCustomSheetView.swift in Sources */,
49812DA9205F94CF00639DDC /* FWPopupWindow.swift in Sources */,
);
runOnlyForDeploymentPostprocessing = 0;
Expand Down
2 changes: 1 addition & 1 deletion FWPopupView/FWPopupView/FWCustomPopupDemoVC.swift
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ import UIKit
class FWCustomPopupDemoVC: UITableViewController {

/// 注意:这边不同的示例可能还附加演示了一些特性(比如:遮罩层是否能够点击、遮罩层的背景颜色等等),有用到时可以参考
var titleArray = ["center - scale", "topCenter - position", "topCenter - frame", "topCenter - scale", "leftCenter - position", "leftCenter - frame", "leftCenter - scale", "bottomCenter - position", "bottomCenter - frame", "bottomCenter - scale", "rightCenter - position", "rightCenter - frame", "rightCenter - scale"]
var titleArray = ["center - scale", "topCenter - position", "topCenter - frame", "topCenter - scale", "leftCenter - position", "leftCenter - frame", "leftCenter - scale", "bottomCenter - position", "bottomCenter - frame", "bottomCenter - scale", "rightCenter - position", "rightCenter - frame", "rightCenter - scale", "center - scale", "topCenter - position", "topCenter - frame", "topCenter - scale", "leftCenter - position", "leftCenter - frame", "leftCenter - scale", "bottomCenter - position", "bottomCenter - frame", "bottomCenter - scale", "rightCenter - position", "rightCenter - frame", "rightCenter - scale"]

lazy var customPopupView1: FWCustomPopupView = {

Expand Down
27 changes: 24 additions & 3 deletions FWPopupView/FWPopupView/FWDemoViewController.swift
Original file line number Diff line number Diff line change
Expand Up @@ -14,12 +14,33 @@ class FWDemoViewController: UITableViewController {
var alertImage: FWAlertView!

/// 注意:这边不同的示例可能还附加演示了一些特性(比如:遮罩层是否能够点击、遮罩层的背景颜色等等),有用到时可以参考
var titleArray = ["Alert - 单个按钮", "Alert - 两个按钮", "Alert - 两个按钮(修改参数)", "Alert - 多个按钮", "Alert - 带输入框", "Alert - 带自定义视图", "Sheet - 少量Item", "Sheet - 大量Item", "Date - 自定义日期选择", "Menu - 自定义菜单", "Custom - 自定义弹窗", "RadioButton"]
var titleArray = ["Alert - 单个按钮", "Alert - 两个按钮", "Alert - 两个按钮(修改参数)", "Alert - 多个按钮", "Alert - 带输入框", "Alert - 带自定义视图", "Sheet - 少量Item", "Sheet - 大量Item", "Date - 自定义日期选择", "Menu - 自定义菜单", "Custom - 自定义弹窗", "FWCustomSheetView - 类似Sheet效果", "RadioButton"]

let block: FWPopupItemClickedBlock = { (popupView, index, title) in
print("AlertView:点击了第\(index)个按钮")
}

lazy var customSheetView: FWCustomSheetView = {

let property = FWCustomSheetViewProperty()
property.popupViewItemHeight = 60
property.secondaryTitleTextAttributes = [NSAttributedStringKey.foregroundColor: kPV_RGBA(r: 138, g: 146, b: 165, a: 1), NSAttributedStringKey.backgroundColor: UIColor.clear, NSAttributedStringKey.font: UIFont.systemFont(ofSize: 12)]
property.lastNeedAccessoryView = true

let titles = ["eoslinwu1122", "eoslinwusd23", "导入钱包"]
let secondaryTitles = ["EOS6sHTCXbm4Gz5WRhKxuuBgVZYttvM9tEdU6ThH6kseMWLYDTk9q", "EOS1sdksbm4Gz5WRhKxuuBgVZYttvM9tEdU6ThH6kseMWLYDTk9q",""]
let images = [UIImage(named: "right_menu_multichat"),
UIImage(named: "right_menu_addFri"),
UIImage(named: "right_menu_QR")]

let customSheetView = FWCustomSheetView.sheet(headerTitle: "选择一个钱包", itemTitles: titles, itemSecondaryTitles: secondaryTitles, itemImages: images as? [UIImage], itemBlock: { (popupView, index, title) in
print("Menu:点击了第\(index)个按钮")
}, property: property)

return customSheetView
}()


override func viewDidLoad() {
super.viewDidLoad()

Expand Down Expand Up @@ -48,7 +69,7 @@ extension FWDemoViewController {
cell.textLabel?.numberOfLines = 0
if indexPath.row == 9 || indexPath.row == 10 {
cell.accessoryType = .disclosureIndicator
} else if indexPath.row == 11 {
} else if indexPath.row == 12 {
let property = FWRadioButtonProperty()
property.selectedStateColor = UIColor.red
property.buttonType = .rectangle
Expand Down Expand Up @@ -186,7 +207,7 @@ extension FWDemoViewController {
self.navigationController?.pushViewController(FWCustomPopupDemoVC(), animated: true)
break
case 11:

self.customSheetView.show()
break
default:
break
Expand Down

0 comments on commit 752b793

Please sign in to comment.