Commit 42d48fd1 authored by jz's avatar jz

add baseweb

parent 8b06f494
......@@ -225,6 +225,7 @@
6003F587195388D20070C39A /* Frameworks */,
6003F588195388D20070C39A /* Resources */,
20C43A9AD7543F1CB63A4FB9 /* [CP] Embed Pods Frameworks */,
9EF5C8615510ED2B25E84552 /* [CP] Copy Pods Resources */,
);
buildRules = (
);
......@@ -320,8 +321,8 @@
inputPaths = (
"${PODS_ROOT}/Target Support Files/Pods-GMBase_Example/Pods-GMBase_Example-frameworks.sh",
"${BUILT_PRODUCTS_DIR}/AFNetworking/AFNetworking.framework",
"${BUILT_PRODUCTS_DIR}/GMBase/GMBase.framework",
"${BUILT_PRODUCTS_DIR}/GMCache/GMCache.framework",
"${BUILT_PRODUCTS_DIR}/GMFoundation/GMFoundation.framework",
"${BUILT_PRODUCTS_DIR}/GMHud/GMHud.framework",
"${BUILT_PRODUCTS_DIR}/GMJSONModel/GMJSONModel.framework",
"${BUILT_PRODUCTS_DIR}/GMKit/GMKit.framework",
......@@ -329,16 +330,20 @@
"${BUILT_PRODUCTS_DIR}/GMPhobos/GMPhobos.framework",
"${BUILT_PRODUCTS_DIR}/GMRefresh/GMRefresh.framework",
"${BUILT_PRODUCTS_DIR}/MBProgressHUD/MBProgressHUD.framework",
"${BUILT_PRODUCTS_DIR}/MJExtension/MJExtension.framework",
"${BUILT_PRODUCTS_DIR}/MJRefresh/MJRefresh.framework",
"${BUILT_PRODUCTS_DIR}/MagicalRecord/MagicalRecord.framework",
"${BUILT_PRODUCTS_DIR}/Masonry/Masonry.framework",
"${BUILT_PRODUCTS_DIR}/SDWebImage/SDWebImage.framework",
"${BUILT_PRODUCTS_DIR}/SnapKit/SnapKit.framework",
"${BUILT_PRODUCTS_DIR}/TMCache/TMCache.framework",
"${BUILT_PRODUCTS_DIR}/UITableView+FDTemplateLayoutCell/UITableView_FDTemplateLayoutCell.framework",
);
name = "[CP] Embed Pods Frameworks";
outputPaths = (
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/AFNetworking.framework",
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/GMBase.framework",
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/GMCache.framework",
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/GMFoundation.framework",
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/GMHud.framework",
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/GMJSONModel.framework",
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/GMKit.framework",
......@@ -346,8 +351,12 @@
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/GMPhobos.framework",
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/GMRefresh.framework",
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/MBProgressHUD.framework",
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/MJExtension.framework",
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/MJRefresh.framework",
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/MagicalRecord.framework",
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/Masonry.framework",
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/SDWebImage.framework",
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/SnapKit.framework",
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/TMCache.framework",
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/UITableView_FDTemplateLayoutCell.framework",
);
......@@ -374,6 +383,24 @@
shellScript = "diff \"${PODS_PODFILE_DIR_PATH}/Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [ $? != 0 ] ; then\n # print error to STDERR\n echo \"error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\" >&2\n exit 1\nfi\n# This output is used by Xcode 'outputs' to avoid re-running this script phase.\necho \"SUCCESS\" > \"${SCRIPT_OUTPUT_FILE_0}\"\n";
showEnvVarsInLog = 0;
};
9EF5C8615510ED2B25E84552 /* [CP] Copy Pods Resources */ = {
isa = PBXShellScriptBuildPhase;
buildActionMask = 2147483647;
files = (
);
inputPaths = (
"${PODS_ROOT}/Target Support Files/Pods-GMBase_Example/Pods-GMBase_Example-resources.sh",
"${PODS_ROOT}/Weibo_SDK/libWeiboSDK/WeiboSDK.bundle",
);
name = "[CP] Copy Pods Resources";
outputPaths = (
"${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/WeiboSDK.bundle",
);
runOnlyForDeploymentPostprocessing = 0;
shellPath = /bin/sh;
shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-GMBase_Example/Pods-GMBase_Example-resources.sh\"\n";
showEnvVarsInLog = 0;
};
E11DAE1A31A4A404D5D11E70 /* [CP] Check Pods Manifest.lock */ = {
isa = PBXShellScriptBuildPhase;
buildActionMask = 2147483647;
......
use_frameworks!
inhibit_all_warnings!
platform :ios, '8.0'
platform :ios, '9.0'
#open source
source 'https://github.com/CocoaPods/Specs.git'
#our company
......@@ -8,6 +8,8 @@ source 'git@git.wanmeizhensuo.com:gengmeiios/GMSpecs.git'
target 'GMBase_Example' do
pod 'GMBase', :path => '../'
pod 'GMShareSDK', :git => 'git@git.wanmeizhensuo.com:gengmeiios/GMShareSDK.git', :commit => '781efd64048ffb9c09099997c97aadb05668568b'
pod 'GMFoundation', :path => '../../GMFoundation'
target 'GMBase_Tests' do
inherit! :search_paths
......
......@@ -14,6 +14,9 @@ PODS:
- AFNetworking/Serialization (3.1.0)
- AFNetworking/UIKit (3.1.0):
- AFNetworking/NSURLSession
- BDOpenSDKKit (1.0.0)
- DouyinOpenSDK (1.4.1):
- BDOpenSDKKit (~> 1.0.0)
- GMBase (1.1.5):
- GMHud
- GMJSONModel
......@@ -21,65 +24,96 @@ PODS:
- GMNetService
- GMPhobos
- GMRefresh
- GMShareSDK
- MBProgressHUD
- SDWebImage
- "UITableView+FDTemplateLayoutCell (= 1.4)"
- GMCache (1.0.1):
- TMCache (= 2.1.0)
- GMHud (1.0.2):
- GMFoundation (1.0.7)
- GMHud (1.0.3):
- MBProgressHUD (= 0.9.2)
- GMJSONModel (1.7.4)
- GMKit (1.1.4):
- GMKit/Category (= 1.1.4)
- GMKit/Color (= 1.1.4)
- GMKit/Constant (= 1.1.4)
- GMKit/FDFullscreenPopGesture (= 1.1.4)
- GMKit/Kit (= 1.1.4)
- GMKit/Protocol (= 1.1.4)
- GMKit (1.2.6):
- GMKit/Category (= 1.2.6)
- GMKit/Color (= 1.2.6)
- GMKit/Constant (= 1.2.6)
- GMKit/FDFullscreenPopGesture (= 1.2.6)
- GMKit/Kit (= 1.2.6)
- GMKit/Protocol (= 1.2.6)
- Masonry
- SDWebImage
- GMKit/Category (1.1.4):
- GMKit/Color (= 1.1.4)
- GMKit/Constant (= 1.1.4)
- GMKit/Protocol (= 1.1.4)
- SnapKit
- GMKit/Category (1.2.6):
- GMKit/Color (= 1.2.6)
- GMKit/Constant (= 1.2.6)
- GMKit/Protocol (= 1.2.6)
- Masonry
- SDWebImage
- GMKit/Color (1.1.4):
- SnapKit
- GMKit/Color (1.2.6):
- Masonry
- SDWebImage
- GMKit/Constant (1.1.4):
- SnapKit
- GMKit/Constant (1.2.6):
- Masonry
- SDWebImage
- GMKit/FDFullscreenPopGesture (1.1.4):
- SnapKit
- GMKit/FDFullscreenPopGesture (1.2.6):
- Masonry
- SDWebImage
- GMKit/Kit (1.1.4):
- GMKit/Category (= 1.1.4)
- GMKit/Color (= 1.1.4)
- GMKit/Constant (= 1.1.4)
- GMKit/Protocol (= 1.1.4)
- SnapKit
- GMKit/Kit (1.2.6):
- GMKit/Category (= 1.2.6)
- GMKit/Color (= 1.2.6)
- GMKit/Constant (= 1.2.6)
- GMKit/Protocol (= 1.2.6)
- Masonry
- SDWebImage
- GMKit/Protocol (1.1.4):
- SnapKit
- GMKit/Protocol (1.2.6):
- Masonry
- SDWebImage
- SnapKit
- GMNetService (1.0.2):
- AFNetworking (= 3.1.0)
- GMPhobos (1.3.5):
- GMPhobos (2.0.4):
- GMCache
- MagicalRecord
- MJExtension
- GMRefresh (1.0.4):
- GMPhobos
- MJRefresh
- GMShareSDK (0.2.0):
- DouyinOpenSDK (= 1.4.1)
- GMFoundation
- GMJSONModel
- GMKit
- GMRefresh (1.0.2):
- GMPhobos
- Masonry
- MBProgressHUD (= 0.9.2)
- WechatOpenSDK (= 1.8.6.2)
- Weibo_SDK (= 3.2.7)
- MagicalRecord (2.3.2):
- MagicalRecord/Core (= 2.3.2)
- MagicalRecord/Core (2.3.2)
- Masonry (1.1.0)
- MBProgressHUD (0.9.2)
- SDWebImage (5.1.1):
- SDWebImage/Core (= 5.1.1)
- SDWebImage/Core (5.1.1)
- MJExtension (3.2.1)
- MJRefresh (3.4.1)
- SDWebImage (5.7.3):
- SDWebImage/Core (= 5.7.3)
- SDWebImage/Core (5.7.3)
- SnapKit (4.2.0)
- TMCache (2.1.0)
- "UITableView+FDTemplateLayoutCell (1.4)"
- WechatOpenSDK (1.8.6.2)
- Weibo_SDK (3.2.7)
DEPENDENCIES:
- GMBase (from `../`)
- GMFoundation (from `../../GMFoundation`)
- "GMShareSDK (from `git@git.wanmeizhensuo.com:gengmeiios/GMShareSDK.git`, commit `781efd64048ffb9c09099997c97aadb05668568b`)"
SPEC REPOS:
"git@git.wanmeizhensuo.com:gengmeiios/GMSpecs.git":
......@@ -92,32 +126,60 @@ SPEC REPOS:
- GMRefresh
https://github.com/CocoaPods/Specs.git:
- AFNetworking
- BDOpenSDKKit
- DouyinOpenSDK
- MagicalRecord
- Masonry
- MBProgressHUD
- MJExtension
- MJRefresh
- SDWebImage
- SnapKit
- TMCache
- "UITableView+FDTemplateLayoutCell"
- WechatOpenSDK
- Weibo_SDK
EXTERNAL SOURCES:
GMBase:
:path: "../"
GMFoundation:
:path: "../../GMFoundation"
GMShareSDK:
:commit: 781efd64048ffb9c09099997c97aadb05668568b
:git: "git@git.wanmeizhensuo.com:gengmeiios/GMShareSDK.git"
CHECKOUT OPTIONS:
GMShareSDK:
:commit: 781efd64048ffb9c09099997c97aadb05668568b
:git: "git@git.wanmeizhensuo.com:gengmeiios/GMShareSDK.git"
SPEC CHECKSUMS:
AFNetworking: 5e0e199f73d8626b11e79750991f5d173d1f8b67
GMBase: b747cd3ecd7a5109469113cf48ce04ae6d16cdbe
BDOpenSDKKit: 3fb530ce73f85a7d6ee69e7fd3d9158444c5bd09
DouyinOpenSDK: 5ba83de22963ba7a3ba70c8ff11dfcb2885ecc2b
GMBase: 2f05a06e886f8ea355e6f8be4276b667611140b4
GMCache: b78d8e46db864405e91d226ce640cc80d966c611
GMHud: 45aa755b72a65f89d810430336803086359c0fb1
GMFoundation: 59cdf19ad5bdc479162da975cc739cf5cb418ab6
GMHud: 18d41f4900a204f27be14e9504fcee2060ae3b2c
GMJSONModel: 5e81a98de668e9f93cf6ff77869f77b0d1a806be
GMKit: 11c9ab9a317f381a05b0e1e577dd95a495625edf
GMKit: ff2a77a9b85e13b4de333ec5eeb10b1ffef09756
GMNetService: 7c69e7981b4fac29657fad5fc86a0c453196b862
GMPhobos: 1e2d68c456b69bf156276d7242877498107474db
GMRefresh: 9d2c521e3d49b68d3c736fb138a87fae4adb05f9
GMPhobos: 5748bbc39eb4242931ade197f7a2212ef13f2d28
GMRefresh: c01ff8de5ada92e1362602fb6991f99124b7dbe3
GMShareSDK: 1d8f739d51083ab5cee25bb978b5e9bfbb206d05
MagicalRecord: 53bed74b4323b930992a725be713e53b37d19755
Masonry: 678fab65091a9290e40e2832a55e7ab731aad201
MBProgressHUD: 1569cf7ace17a8bac47aabfbb8580a49690386d1
SDWebImage: 96d7f03415ccb28d299d765f93557ff8a617abd8
MJExtension: 635f2c663dcb1bf76fa4b715b2570a5710aec545
MJRefresh: 3153c59a363159092c08b2177ec3a7d09f90bfaf
SDWebImage: 97351f6582ceca541ea294ba66a1fcb342a331c2
SnapKit: fe8a619752f3f27075cc9a90244d75c6c3f27e2a
TMCache: 95ebcc9b3c7e90fb5fd8fc3036cba3aa781c9bed
"UITableView+FDTemplateLayoutCell": 234e1582bcc4e18461af91155123bb96538ed030
WechatOpenSDK: 8b3ba4239193d1112205c139c94e21934e8f369a
Weibo_SDK: 5a4d08f7e1fedbb635435e4585c8c0439c7da089
PODFILE CHECKSUM: b9c24bb8fb1ea50b58c59e079b456b4ca1d9b998
PODFILE CHECKSUM: b70d32325af03093c872ec87f2100f40b8b1e2d8
COCOAPODS: 1.9.1
......@@ -18,4 +18,8 @@ Pod::Spec.new do |s|
s.dependency 'GMHud'
s.dependency 'GMKit'
s.dependency 'SDWebImage'
s.dependency 'GMShareSDK'
s.swift_version = '4.2'
s.static_framework = true
end
//
// GMCommonAlertView.swift
// Gengmei
//
// Created by Terminator on 2017/7/5.
// Copyright © 2017年 更美互动信息科技有限公司. All rights reserved.
//
import UIKit
import GMKit
@objc protocol GMCommonAlertViewDelegate: class {
func didClickCommonAlert(buttonIndex: Int, alertView: GMCommonAlertView)
}
@objcMembers
class GMCommonAlertView: GMView {
let alertView = GMView()
let titleLabel = GMLabel(textColor: UIColor.headlineText, fontSize: 16)
let subLabel = GMLabel(textColor: UIColor.auxiliaryTextLight, fontSize: 14)
var button1 = GMGradualButton()
var button2: GMButton!
var button3: GMButton!
weak var delegate: GMCommonAlertViewDelegate?
override func setup() {
super.setup()
setupSubviews()
}
private func setupSubviews() {
backgroundColor = UIColor.black.withAlphaComponent(0.6)
addSubview(alertView)
alertView.backgroundColor = UIColor.white
alertView.layer.cornerRadius = 10
alertView.layer.masksToBounds = true
alertView.snp.makeConstraints { (make) in
make.centerY.equalToSuperview()
make.centerX.equalToSuperview()
make.size.equalTo(CGSize(width: 270, height: 280))
}
let headerImage = GMImageView(image: UIImage(named: "notify_bell"))
addSubview(headerImage)
headerImage.snp.makeConstraints { (make) in
make.centerX.equalToSuperview()
make.top.equalTo(alertView.snp.top).offset(-38)
}
titleLabel.text = "打开推送通知"
alertView.addSubview(titleLabel)
titleLabel.snp.makeConstraints { (make) in
make.centerX.equalToSuperview()
make.top.equalTo(70)
}
subLabel.text = "第一时间接受TA的日记更新?"
alertView.addSubview(subLabel)
subLabel.snp.makeConstraints { (make) in
make.centerX.equalToSuperview()
make.top.equalTo(titleLabel.snp.bottom).offset(5)
}
button1.setTitleColor(UIColor.white, for: UIControlState.normal)
button1.setTitle("确定打开", for: UIControlState.normal)
button1.gradualColor = [UIColor(hex: 0x51D3E7), UIColor(hex: 0x3BE7DA)]
button1.layer.cornerRadius = 20
button1.layer.masksToBounds = true
button1.titleLabel?.font = UIFont.gmFont(16)
button1.tag = 1001
button1.addTarget(self, action: #selector(GMCommonAlertView.buttonTapAction(_:)), for: UIControlEvents.touchUpInside)
alertView.addSubview(button1)
button1.snp.makeConstraints { (make) in
make.centerX.equalToSuperview()
make.top.equalTo(subLabel.snp.bottom).offset(15)
make.size.equalTo(CGSize(width: 200, height: 40))
}
// button1.setGradualChangeColor(colors: [UIColor(hex: 0x23E3E1), UIColor(hex: 0x2CD7E6)])
button2 = addButtonWith("不用打开", backgroundColor: UIColor.clear, titleColor: UIColor.mainVisual, borderColor: UIColor.mainVisual)
button2.addTarget(self, action: #selector(GMCommonAlertView.buttonTapAction(_:)), for: UIControlEvents.touchUpInside)
button2.tag = 1002
button2.titleLabel?.font = UIFont.gmFont(16)
alertView.addSubview(button2)
button2.snp.makeConstraints { (make) in
make.centerX.equalToSuperview()
make.top.equalTo(button1.snp.bottom).offset(15)
make.size.equalTo(CGSize(width: 200, height: 40))
}
button3 = addButtonWith("不再提醒", backgroundColor: UIColor.clear, titleColor: UIColor.auxiliaryTextLight, borderColor: UIColor.clear)
button3.addTarget(self, action: #selector(GMCommonAlertView.buttonTapAction(_:)), for: UIControlEvents.touchUpInside)
button3.tag = 1003
alertView.addSubview(button3)
button3.titleLabel?.font = UIFont.gmFont(14)
button3.snp.makeConstraints { (make) in
make.centerX.equalToSuperview()
make.top.equalTo(button2.snp.bottom).offset(10)
make.size.equalTo(CGSize(width: 200, height: 30))
}
}
// MARK: - 添加button
private func addButtonWith(_ title: String, backgroundColor: UIColor, titleColor: UIColor, borderColor: UIColor) -> GMButton {
let button = GMButton(title: title, backgroundColor: backgroundColor, titleFontSize: 14, titleColor: titleColor)
button.layer.cornerRadius = 20
button.layer.borderWidth = 0.5
button.layer.borderColor = borderColor.cgColor
button.layer.masksToBounds = true
return button
}
func buttonTapAction(_ sender: GMButton) {
let index = sender.tag - 1000
delegate?.didClickCommonAlert(buttonIndex: index, alertView: self)
}
@objc func show() {
UIApplication.shared.keyWindow?.addSubview(self)
self.snp.makeConstraints { (make) in
make.edges.equalTo(UIEdgeInsets.zero)
}
}
@objc func dismiss() {
self.perform(#selector(removeFromSuperview))
}
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment