Commit d5bd31af cgx

动态发布页面UI调整、绑定手机号码页面搭建

1 个父辈 b97c85ce
正在显示 30 个修改的文件 包含 361 行增加95 行删除
...@@ -666,7 +666,7 @@ ...@@ -666,7 +666,7 @@
D09D0E9C280D73B6008DEDAB /* InviteController.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = InviteController.m; sourceTree = "<group>"; }; D09D0E9C280D73B6008DEDAB /* InviteController.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = InviteController.m; sourceTree = "<group>"; };
D0A1C48128C195CD000975DC /* CommunityController.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = CommunityController.h; sourceTree = "<group>"; }; D0A1C48128C195CD000975DC /* CommunityController.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = CommunityController.h; sourceTree = "<group>"; };
D0A1C48228C195CD000975DC /* CommunityController.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = CommunityController.m; sourceTree = "<group>"; }; D0A1C48228C195CD000975DC /* CommunityController.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = CommunityController.m; sourceTree = "<group>"; };
D0A1C48428C197B3000975DC /* Community.storyboard */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Community.storyboard; path = "/Users/peter/SourceTree/DreamSleep-iOS/DreamSleep/DreamSleep/Class/CommunityModule/Community.storyboard"; sourceTree = "<absolute>"; }; D0A1C48428C197B3000975DC /* Community.storyboard */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Community.storyboard; path = "/Users/peter/SourceTree/DreamSleep-iOS/DreamSleep/DreamSleep/Class/CommunityModule/DynamicList/Controller/Community.storyboard"; sourceTree = "<absolute>"; };
D0A1C49028C2084B000975DC /* ArticleRequestModel.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = ArticleRequestModel.h; sourceTree = "<group>"; }; D0A1C49028C2084B000975DC /* ArticleRequestModel.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = ArticleRequestModel.h; sourceTree = "<group>"; };
D0A1C49128C2084B000975DC /* ArticleRequestModel.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = ArticleRequestModel.m; sourceTree = "<group>"; }; D0A1C49128C2084B000975DC /* ArticleRequestModel.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = ArticleRequestModel.m; sourceTree = "<group>"; };
D0A245F4283DB12100FB49AA /* WKWebView+Extras.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "WKWebView+Extras.h"; sourceTree = "<group>"; }; D0A245F4283DB12100FB49AA /* WKWebView+Extras.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "WKWebView+Extras.h"; sourceTree = "<group>"; };
...@@ -1282,6 +1282,15 @@ ...@@ -1282,6 +1282,15 @@
path = SleepReady; path = SleepReady;
sourceTree = "<group>"; sourceTree = "<group>";
}; };
D03041A62901305100840AE1 /* ConfirmBox */ = {
isa = PBXGroup;
children = (
D0FE45CC28FFE8E20020710A /* ConfirmBox.h */,
D0FE45CD28FFE8E20020710A /* ConfirmBox.m */,
);
path = ConfirmBox;
sourceTree = "<group>";
};
D030796628E3D92700ED96BF /* LikeButton */ = { D030796628E3D92700ED96BF /* LikeButton */ = {
isa = PBXGroup; isa = PBXGroup;
children = ( children = (
...@@ -1610,8 +1619,6 @@ ...@@ -1610,8 +1619,6 @@
D0FE45BB28FF80AA0020710A /* MyDynamicController.m */, D0FE45BB28FF80AA0020710A /* MyDynamicController.m */,
D0FE45BD28FF814C0020710A /* MyDynamicView.h */, D0FE45BD28FF814C0020710A /* MyDynamicView.h */,
D0FE45BE28FF814C0020710A /* MyDynamicView.m */, D0FE45BE28FF814C0020710A /* MyDynamicView.m */,
D0FE45CC28FFE8E20020710A /* ConfirmBox.h */,
D0FE45CD28FFE8E20020710A /* ConfirmBox.m */,
D0FE45C328FF862F0020710A /* MyDynamicListResultModel.h */, D0FE45C328FF862F0020710A /* MyDynamicListResultModel.h */,
D0FE45C428FF862F0020710A /* MyDynamicListResultModel.m */, D0FE45C428FF862F0020710A /* MyDynamicListResultModel.m */,
); );
...@@ -1860,6 +1867,7 @@ ...@@ -1860,6 +1867,7 @@
children = ( children = (
D078280C28FE612200C8D612 /* TextInput */, D078280C28FE612200C8D612 /* TextInput */,
D030796628E3D92700ED96BF /* LikeButton */, D030796628E3D92700ED96BF /* LikeButton */,
D03041A62901305100840AE1 /* ConfirmBox */,
D078280328FE5A6500C8D612 /* MKTextView */, D078280328FE5A6500C8D612 /* MKTextView */,
); );
path = View; path = View;
......
...@@ -11,9 +11,12 @@ NS_ASSUME_NONNULL_BEGIN ...@@ -11,9 +11,12 @@ NS_ASSUME_NONNULL_BEGIN
/* /*
自定义导航栏基类 自定义导航栏基类
日间模式:黑色风格 夜间模式:白色风格
我的积分页面 我的积分页面
每日任务页面 每日任务页面
安睡准备页面
绑定手机页面
*/ */
@interface DSNaviBarViewController : UIViewController @interface DSNaviBarViewController : UIViewController
/// 自定义导航栏 /// 自定义导航栏
......
...@@ -13,12 +13,12 @@ ...@@ -13,12 +13,12 @@
#import "DynamicDetailController.h" #import "DynamicDetailController.h"
@interface CommunityController () <CommunityViewDelegate, DynamicControllerDelegate, DynamicDetailControllerDelegate> @interface CommunityController () <CommunityViewDelegate, DynamicControllerDelegate, DynamicDetailControllerDelegate>
@property (nonatomic, strong) CommunityView *communityView;
@property (nonatomic, assign) int offset;
@property (nonatomic, strong) NSURLSessionDataTask *likeDataTask;
/// 存储动态id /// 存储动态id
@property (nonatomic, assign) int talkID; @property (nonatomic, assign) int talkID;
@property (nonatomic, assign) int offset;
@property (nonatomic, strong) CommunityView *communityView;
@property (nonatomic, strong) ComListViewModel *comListViewModel; @property (nonatomic, strong) ComListViewModel *comListViewModel;
@property (nonatomic, strong) NSURLSessionDataTask *likeDataTask;
@end @end
@implementation CommunityController @implementation CommunityController
...@@ -106,13 +106,7 @@ ...@@ -106,13 +106,7 @@
[LoginUtils jumpToLoginControllerWithTarget:self]; [LoginUtils jumpToLoginControllerWithTarget:self];
return; return;
} }
// 2、登录了,判断是否绑定了手机号 // 2、进入发布动态页面
if (![LoginUtils getUserMobile]) {
UIViewController *bindVC = [[UIStoryboard storyboardWithName:@"BindMobileController" bundle:nil] instantiateViewControllerWithIdentifier:@"BindMobileController"];
[self.navigationController pushViewController:bindVC animated:YES];
return;
}
// 3、进入发布动态页面
DynamicController *dyController = [DynamicController new]; DynamicController *dyController = [DynamicController new];
dyController.delegate = self; dyController.delegate = self;
[self.navigationController pushViewController:dyController animated:YES]; [self.navigationController pushViewController:dyController animated:YES];
......
...@@ -5,11 +5,11 @@ ...@@ -5,11 +5,11 @@
// Created by peter on 2022/9/24. // Created by peter on 2022/9/24.
// //
#import <UIKit/UIKit.h> #import "DSNaviBarViewController.h"
NS_ASSUME_NONNULL_BEGIN NS_ASSUME_NONNULL_BEGIN
@interface BindMobileController : UIViewController @interface BindMobileController : DSNaviBarViewController
@end @end
......
...@@ -8,8 +8,19 @@ ...@@ -8,8 +8,19 @@
#import "BindMobileController.h" #import "BindMobileController.h"
@interface BindMobileController () @interface BindMobileController ()
@property (weak, nonatomic) IBOutlet UILabel *bindMobileLab;
@property (weak, nonatomic) IBOutlet UILabel *mobileLab;
@property (weak, nonatomic) IBOutlet UIImageView *mobileIcon;
@property (weak, nonatomic) IBOutlet UILabel *countryLab;
@property (weak, nonatomic) IBOutlet UIImageView *selectIcon;
@property (weak, nonatomic) IBOutlet UITextField *mobileTF; @property (weak, nonatomic) IBOutlet UITextField *mobileTF;
@property (weak, nonatomic) IBOutlet UITextField *codeTF; @property (weak, nonatomic) IBOutlet UIView *mobileLine;
@property (weak, nonatomic) IBOutlet UILabel *verifyLab;
@property (weak, nonatomic) IBOutlet UITextField *verifyTF;
@property (weak, nonatomic) IBOutlet UIButton *getCodeBtn;
@property (weak, nonatomic) IBOutlet UIView *codeLine;
@property (weak, nonatomic) IBOutlet UIButton *bindBtn;
@property (weak, nonatomic) IBOutlet UILabel *tipsLab;
@end @end
@implementation BindMobileController @implementation BindMobileController
...@@ -17,10 +28,36 @@ ...@@ -17,10 +28,36 @@
- (void)viewDidLoad { - (void)viewDidLoad {
[super viewDidLoad]; [super viewDidLoad];
self.navigationItem.title = @"绑定手机号"; [self initUI];
}
- (void)initUI {
self.naviBarAlpha = 1.0;
self.naviBgColor = DSClearColor;
self.view.dk_backgroundColorPicker = DKColorPickerWithKey(VCViewBG); self.view.dk_backgroundColorPicker = DKColorPickerWithKey(VCViewBG);
[self.backBtn dk_setImage:DKImagePickerWithNames(@"cus_back_icon", @"sys_back_icon", @"sys_back_icon") forState:UIControlStateNormal];
[self.dsNaviBar addSubview:self.backBtn];
self.bindMobileLab.dk_textColorPicker = DKColorPickerWithKey(Dk_TITLE);
self.mobileLab.dk_textColorPicker = DKColorPickerWithKey(Dk_TITLE);
self.countryLab.dk_textColorPicker = DKColorPickerWithKey(Dk_TITLE);
self.mobileTF.dk_textColorPicker = DKColorPickerWithKey(Dk_TITLE);
self.verifyLab.dk_textColorPicker = DKColorPickerWithKey(Dk_TITLE);
self.verifyLab.dk_textColorPicker = DKColorPickerWithKey(Dk_TITLE);
self.verifyTF.dk_textColorPicker = DKColorPickerWithKey(Dk_TITLE);
self.tipsLab.dk_textColorPicker = DKColorPickerWithColors(SmallTextColor, ColorFromHexA(0xFFFFFF, .3), DSWhite);
self.mobileLine.dk_backgroundColorPicker = DKColorPickerWithColors(ColorFromHex(0xE6E6E6), AlertDarkColor, DSWhite);
self.codeLine.dk_backgroundColorPicker = DKColorPickerWithColors(ColorFromHex(0xE6E6E6), AlertDarkColor, DSWhite);
self.mobileIcon.dk_imagePicker = DKImagePickerWithNames(@"ic_bangding_shouji", @"dk_ic_bangding_shouji", @"ic_bangding_shouji");
self.selectIcon.dk_imagePicker = DKImagePickerWithNames(@"ic_bangding_xiala", @"dk_ic_bangding_xiala", @"ic_bangding_xiala");
self.bindBtn.dk_backgroundColorPicker = DKColorPickerWithKey(BrandBG);
[self.bindBtn dk_setTitleColorPicker:DKColorPickerWithKey(Sub_Navi_TITLE) forState:UIControlStateNormal];
} }
#pragma mark - Action
- (IBAction)getMobileCode:(UIButton *)sender { - (IBAction)getMobileCode:(UIButton *)sender {
if (self.mobileTF.text.length) { if (self.mobileTF.text.length) {
[DSProgressHUD showProgressHUDWithInfo:@""]; [DSProgressHUD showProgressHUDWithInfo:@""];
...@@ -35,9 +72,9 @@ ...@@ -35,9 +72,9 @@
} }
- (IBAction)bindMobile:(UIButton *)sender { - (IBAction)bindMobile:(UIButton *)sender {
if (self.mobileTF.text.length && self.codeTF.text.length) { if (self.mobileTF.text.length && self.verifyTF.text.length) {
[DSProgressHUD showProgressHUDWithInfo:@""]; [DSProgressHUD showProgressHUDWithInfo:@""];
[UserRequestModel verifyBindMobile:self.mobileTF.text code:self.codeTF.text completion:^(UserRequestModel * _Nonnull requestModel) { [UserRequestModel verifyBindMobile:self.mobileTF.text code:self.verifyTF.text completion:^(UserRequestModel * _Nonnull requestModel) {
[DSProgressHUD dissmissProgressHUD]; [DSProgressHUD dissmissProgressHUD];
if (requestModel.resCode == DSResCodeSuccess) { if (requestModel.resCode == DSResCodeSuccess) {
// 保存绑定手机号码标识 // 保存绑定手机号码标识
...@@ -51,9 +88,9 @@ ...@@ -51,9 +88,9 @@
} }
} }
#pragma mark - 品牌模式 #pragma mark - 关闭侧滑
- (NaviStyle)navigationBarStyle { - (BOOL)enableInteractivePopGestureRecognizer {
return NaviStyleDefault; return NO;
} }
@end @end
<?xml version="1.0" encoding="UTF-8"?> <?xml version="1.0" encoding="UTF-8"?>
<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="20037" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" useSafeAreas="YES" colorMatched="YES"> <document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="20037" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" useSafeAreas="YES" colorMatched="YES">
<device id="retina6_1" orientation="portrait" appearance="light"/> <device id="retina5_5" orientation="portrait" appearance="light"/>
<dependencies> <dependencies>
<deployment identifier="iOS"/> <deployment identifier="iOS"/>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="20020"/> <plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="20020"/>
...@@ -14,83 +14,122 @@ ...@@ -14,83 +14,122 @@
<objects> <objects>
<viewController storyboardIdentifier="BindMobileController" id="Y6W-OH-hqX" customClass="BindMobileController" sceneMemberID="viewController"> <viewController storyboardIdentifier="BindMobileController" id="Y6W-OH-hqX" customClass="BindMobileController" sceneMemberID="viewController">
<view key="view" contentMode="scaleToFill" id="5EZ-qb-Rvc"> <view key="view" contentMode="scaleToFill" id="5EZ-qb-Rvc">
<rect key="frame" x="0.0" y="0.0" width="414" height="896"/> <rect key="frame" x="0.0" y="0.0" width="414" height="736"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/> <autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
<subviews> <subviews>
<textField opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="left" contentVerticalAlignment="center" borderStyle="roundedRect" placeholder="请输入手机号" textAlignment="center" minimumFontSize="17" clearButtonMode="whileEditing" translatesAutoresizingMaskIntoConstraints="NO" id="PKx-1q-E2W"> <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" fixedFrame="YES" text="绑定手机" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="8ji-h4-dGD">
<rect key="frame" x="107" y="144" width="200" height="40"/> <rect key="frame" x="30" y="162" width="122" height="36"/>
<constraints> <autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
<constraint firstAttribute="height" constant="40" id="gJf-eb-jZm"/> <fontDescription key="fontDescription" type="boldSystem" pointSize="30"/>
<constraint firstAttribute="width" constant="200" id="sUS-Xo-qeb"/> <nil key="textColor"/>
</constraints> <nil key="highlightedColor"/>
<fontDescription key="fontDescription" type="system" pointSize="16"/> </label>
<textInputTraits key="textInputTraits" keyboardType="numberPad" returnKeyType="done"/> <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" fixedFrame="YES" text="手机号码" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="YqO-NQ-fpx">
<rect key="frame" x="30" y="238" width="66" height="20"/>
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
<fontDescription key="fontDescription" type="boldSystem" pointSize="16"/>
<nil key="textColor"/>
<nil key="highlightedColor"/>
</label>
<imageView clipsSubviews="YES" userInteractionEnabled="NO" contentMode="scaleAspectFit" horizontalHuggingPriority="251" verticalHuggingPriority="251" fixedFrame="YES" image="ic_bangding_shouji" translatesAutoresizingMaskIntoConstraints="NO" id="MhA-vv-J9F">
<rect key="frame" x="30" y="282" width="20" height="20"/>
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
</imageView>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" fixedFrame="YES" text="+86" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="Mld-BQ-jeK">
<rect key="frame" x="58" y="283" width="28" height="18"/>
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
<fontDescription key="fontDescription" type="system" pointSize="15"/>
<nil key="textColor"/>
<nil key="highlightedColor"/>
</label>
<imageView clipsSubviews="YES" userInteractionEnabled="NO" contentMode="scaleAspectFit" horizontalHuggingPriority="251" verticalHuggingPriority="251" fixedFrame="YES" image="ic_bangding_xiala" translatesAutoresizingMaskIntoConstraints="NO" id="yu9-Mt-h1F">
<rect key="frame" x="90" y="282" width="20" height="20"/>
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
</imageView>
<textField opaque="NO" contentMode="scaleToFill" fixedFrame="YES" contentHorizontalAlignment="left" contentVerticalAlignment="center" textAlignment="natural" minimumFontSize="17" translatesAutoresizingMaskIntoConstraints="NO" id="VA1-4e-TXw">
<rect key="frame" x="122" y="282" width="232" height="20"/>
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
<fontDescription key="fontDescription" type="system" pointSize="15"/>
<textInputTraits key="textInputTraits"/>
</textField> </textField>
<textField opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="left" contentVerticalAlignment="center" borderStyle="roundedRect" placeholder="输入验证码" textAlignment="center" minimumFontSize="17" clearButtonMode="whileEditing" translatesAutoresizingMaskIntoConstraints="NO" id="RjI-FY-pxl"> <view contentMode="scaleToFill" fixedFrame="YES" translatesAutoresizingMaskIntoConstraints="NO" id="xVQ-vH-hwz">
<rect key="frame" x="107" y="244" width="200" height="40"/> <rect key="frame" x="30" y="310" width="354" height="1"/>
<fontDescription key="fontDescription" type="system" pointSize="14"/> <autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
<textInputTraits key="textInputTraits" keyboardType="numberPad" returnKeyType="done"/> <color key="backgroundColor" systemColor="systemGray4Color"/>
</view>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" fixedFrame="YES" text="验证码" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="2KP-cx-O6s">
<rect key="frame" x="30" y="336" width="49" height="20"/>
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
<fontDescription key="fontDescription" type="boldSystem" pointSize="16"/>
<nil key="textColor"/>
<nil key="highlightedColor"/>
</label>
<textField opaque="NO" contentMode="scaleToFill" fixedFrame="YES" contentHorizontalAlignment="left" contentVerticalAlignment="center" textAlignment="natural" minimumFontSize="17" translatesAutoresizingMaskIntoConstraints="NO" id="Uc9-gm-PJX">
<rect key="frame" x="30" y="380" width="107.5" height="20"/>
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
<fontDescription key="fontDescription" type="system" pointSize="15"/>
<textInputTraits key="textInputTraits"/>
</textField> </textField>
<button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="system" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="mXp-Ce-M2p"> <button opaque="NO" contentMode="scaleToFill" fixedFrame="YES" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="system" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="lnm-IB-3JO">
<rect key="frame" x="107" y="344" width="200" height="40"/> <rect key="frame" x="286" y="377.5" width="101" height="32"/>
<color key="backgroundColor" red="0.38431372549999998" green="0.76470588240000004" blue="0.83529411760000005" alpha="1" colorSpace="calibratedRGB"/> <autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
<state key="normal" title="Button"/> <fontDescription key="fontDescription" type="system" pointSize="15"/>
<buttonConfiguration key="configuration" style="plain" title="获取验证码"> <inset key="imageEdgeInsets" minX="0.0" minY="0.0" maxX="2.2250738585072014e-308" maxY="0.0"/>
<fontDescription key="titleFontDescription" type="system" pointSize="18"/> <state key="normal" title="获取验证码">
</buttonConfiguration> <color key="titleColor" red="0.38431372549019605" green="0.76470588235294112" blue="0.83529411764705885" alpha="1" colorSpace="calibratedRGB"/>
</state>
<connections> <connections>
<action selector="getMobileCode:" destination="Y6W-OH-hqX" eventType="touchUpInside" id="6iN-1a-9g4"/> <action selector="getMobileCode:" destination="Y6W-OH-hqX" eventType="touchUpInside" id="hZz-Ol-Nxg"/>
</connections> </connections>
</button> </button>
<button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="system" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="fUn-aJ-SXe"> <view contentMode="scaleToFill" fixedFrame="YES" translatesAutoresizingMaskIntoConstraints="NO" id="Bgw-6u-68b">
<rect key="frame" x="107" y="444" width="200" height="40"/> <rect key="frame" x="30" y="413.5" width="354" height="1"/>
<color key="backgroundColor" red="0.38431372549999998" green="0.76470588240000004" blue="0.83529411760000005" alpha="1" colorSpace="calibratedRGB"/> <autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
<state key="normal" title="Button"/> <color key="backgroundColor" systemColor="systemGray3Color"/>
<buttonConfiguration key="configuration" style="plain" title="绑定"> </view>
<fontDescription key="titleFontDescription" type="system" pointSize="18"/> <button opaque="NO" contentMode="scaleToFill" fixedFrame="YES" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="system" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="xm7-c6-wqa">
</buttonConfiguration> <rect key="frame" x="104" y="478.5" width="206" height="50"/>
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
<fontDescription key="fontDescription" type="boldSystem" pointSize="16"/>
<inset key="imageEdgeInsets" minX="0.0" minY="0.0" maxX="2.2250738585072014e-308" maxY="0.0"/>
<state key="normal" title="绑定手机号">
<color key="titleColor" red="0.38431372549999998" green="0.76470588240000004" blue="0.83529411760000005" alpha="1" colorSpace="calibratedRGB"/>
</state>
<userDefinedRuntimeAttributes>
<userDefinedRuntimeAttribute type="number" keyPath="layer.cornerRadius">
<integer key="value" value="25"/>
</userDefinedRuntimeAttribute>
<userDefinedRuntimeAttribute type="boolean" keyPath="layer.masksToBounds" value="YES"/>
</userDefinedRuntimeAttributes>
<connections> <connections>
<action selector="bindMobile:" destination="Y6W-OH-hqX" eventType="touchUpInside" id="UBa-41-Lb4"/> <action selector="bindMobile:" destination="Y6W-OH-hqX" eventType="touchUpInside" id="gR7-5b-lb4"/>
</connections> </connections>
</button> </button>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="根据监管部门要求,需要实名认证才能发布动态" textAlignment="center" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="oc9-UL-yfy"> <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" fixedFrame="YES" text="应国家相关法律要求,使用信息发布,即时通讯等互联网服务需要进行身份验证。为保障您对相关服务功能的正常使用,建议您尽快完成手机号验证,感谢您的理解和支持。" lineBreakMode="tailTruncation" numberOfLines="0" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="LbC-sS-eWX">
<rect key="frame" x="5" y="564" width="404" height="19.5"/> <rect key="frame" x="15" y="576.5" width="384" height="43"/>
<fontDescription key="fontDescription" type="system" pointSize="16"/> <autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
<color key="textColor" red="1" green="0.58431372550000005" blue="0.0" alpha="1" colorSpace="custom" customColorSpace="sRGB"/> <fontDescription key="fontDescription" type="system" pointSize="12"/>
<nil key="textColor"/>
<nil key="highlightedColor"/> <nil key="highlightedColor"/>
</label> </label>
</subviews> </subviews>
<viewLayoutGuide key="safeArea" id="vDu-zF-Fre"/> <viewLayoutGuide key="safeArea" id="vDu-zF-Fre"/>
<color key="backgroundColor" systemColor="systemBackgroundColor"/> <color key="backgroundColor" systemColor="systemBackgroundColor"/>
<constraints>
<constraint firstItem="RjI-FY-pxl" firstAttribute="height" secondItem="PKx-1q-E2W" secondAttribute="height" id="0wj-wF-jLD"/>
<constraint firstItem="PKx-1q-E2W" firstAttribute="centerX" secondItem="5EZ-qb-Rvc" secondAttribute="centerX" id="1bE-Ee-CLH"/>
<constraint firstItem="mXp-Ce-M2p" firstAttribute="centerX" secondItem="5EZ-qb-Rvc" secondAttribute="centerX" id="8Vf-pJ-vOU"/>
<constraint firstItem="fUn-aJ-SXe" firstAttribute="top" secondItem="mXp-Ce-M2p" secondAttribute="bottom" constant="60" id="Al6-F1-cbs"/>
<constraint firstItem="mXp-Ce-M2p" firstAttribute="top" secondItem="RjI-FY-pxl" secondAttribute="bottom" constant="60" id="Bvu-h2-Nxd"/>
<constraint firstItem="RjI-FY-pxl" firstAttribute="centerX" secondItem="5EZ-qb-Rvc" secondAttribute="centerX" id="MAL-GK-htz"/>
<constraint firstItem="fUn-aJ-SXe" firstAttribute="width" secondItem="mXp-Ce-M2p" secondAttribute="width" id="NBH-ti-KTO"/>
<constraint firstItem="oc9-UL-yfy" firstAttribute="leading" secondItem="vDu-zF-Fre" secondAttribute="leading" constant="5" id="RJv-td-7Lt"/>
<constraint firstItem="RjI-FY-pxl" firstAttribute="centerX" secondItem="5EZ-qb-Rvc" secondAttribute="centerX" id="TTr-0A-Cff"/>
<constraint firstItem="RjI-FY-pxl" firstAttribute="width" secondItem="PKx-1q-E2W" secondAttribute="width" id="W4U-hV-S76"/>
<constraint firstItem="PKx-1q-E2W" firstAttribute="top" secondItem="vDu-zF-Fre" secondAttribute="top" constant="100" id="YdE-l4-DOJ"/>
<constraint firstItem="RjI-FY-pxl" firstAttribute="top" secondItem="PKx-1q-E2W" secondAttribute="bottom" constant="60" id="Yld-QE-QjN"/>
<constraint firstItem="fUn-aJ-SXe" firstAttribute="height" secondItem="mXp-Ce-M2p" secondAttribute="height" id="bXj-Tj-Ou6"/>
<constraint firstItem="oc9-UL-yfy" firstAttribute="top" secondItem="fUn-aJ-SXe" secondAttribute="bottom" constant="80" id="cus-he-2EQ"/>
<constraint firstItem="vDu-zF-Fre" firstAttribute="trailing" secondItem="oc9-UL-yfy" secondAttribute="trailing" constant="5" id="fOO-dt-0nn"/>
<constraint firstItem="fUn-aJ-SXe" firstAttribute="centerX" secondItem="5EZ-qb-Rvc" secondAttribute="centerX" id="fUP-Qs-wck"/>
<constraint firstItem="mXp-Ce-M2p" firstAttribute="centerX" secondItem="5EZ-qb-Rvc" secondAttribute="centerX" id="hzG-F6-ZY7"/>
<constraint firstItem="mXp-Ce-M2p" firstAttribute="height" secondItem="RjI-FY-pxl" secondAttribute="height" id="jWO-jn-CK0"/>
<constraint firstItem="mXp-Ce-M2p" firstAttribute="width" secondItem="RjI-FY-pxl" secondAttribute="width" id="mCZ-Uj-uyC"/>
<constraint firstItem="RjI-FY-pxl" firstAttribute="top" secondItem="PKx-1q-E2W" secondAttribute="bottom" constant="60" id="pn3-hv-kiH"/>
<constraint firstItem="PKx-1q-E2W" firstAttribute="centerX" secondItem="5EZ-qb-Rvc" secondAttribute="centerX" id="tEM-tI-bNz"/>
<constraint firstItem="mXp-Ce-M2p" firstAttribute="top" secondItem="RjI-FY-pxl" secondAttribute="bottom" constant="60" id="x1G-BW-rJe"/>
<constraint firstItem="oc9-UL-yfy" firstAttribute="centerX" secondItem="5EZ-qb-Rvc" secondAttribute="centerX" id="yR4-yV-S7P"/>
</constraints>
</view> </view>
<connections> <connections>
<outlet property="codeTF" destination="RjI-FY-pxl" id="azH-hv-rNX"/> <outlet property="bindBtn" destination="xm7-c6-wqa" id="iIF-DU-Gwg"/>
<outlet property="mobileTF" destination="PKx-1q-E2W" id="QAp-cQ-z84"/> <outlet property="bindMobileLab" destination="8ji-h4-dGD" id="GPu-t6-ffN"/>
<outlet property="codeLine" destination="Bgw-6u-68b" id="ATU-DJ-vdg"/>
<outlet property="countryLab" destination="Mld-BQ-jeK" id="ptI-TO-2uy"/>
<outlet property="getCodeBtn" destination="lnm-IB-3JO" id="Wsr-5U-kOk"/>
<outlet property="mobileIcon" destination="MhA-vv-J9F" id="XeE-DX-NJ2"/>
<outlet property="mobileLab" destination="YqO-NQ-fpx" id="y69-AW-XAg"/>
<outlet property="mobileLine" destination="xVQ-vH-hwz" id="IGM-TL-88Q"/>
<outlet property="mobileTF" destination="VA1-4e-TXw" id="p43-en-Gdb"/>
<outlet property="selectIcon" destination="yu9-Mt-h1F" id="uRe-ow-ETF"/>
<outlet property="tipsLab" destination="LbC-sS-eWX" id="yH1-if-PRR"/>
<outlet property="verifyLab" destination="2KP-cx-O6s" id="eZH-qm-yQh"/>
<outlet property="verifyTF" destination="Uc9-gm-PJX" id="AAM-go-548"/>
</connections> </connections>
</viewController> </viewController>
<placeholder placeholderIdentifier="IBFirstResponder" id="Ief-a0-LHa" userLabel="First Responder" customClass="UIResponder" sceneMemberID="firstResponder"/> <placeholder placeholderIdentifier="IBFirstResponder" id="Ief-a0-LHa" userLabel="First Responder" customClass="UIResponder" sceneMemberID="firstResponder"/>
...@@ -99,8 +138,16 @@ ...@@ -99,8 +138,16 @@
</scene> </scene>
</scenes> </scenes>
<resources> <resources>
<image name="ic_bangding_shouji" width="20" height="20"/>
<image name="ic_bangding_xiala" width="20" height="20"/>
<systemColor name="systemBackgroundColor"> <systemColor name="systemBackgroundColor">
<color white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/> <color white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
</systemColor> </systemColor>
<systemColor name="systemGray3Color">
<color red="0.7803921568627451" green="0.7803921568627451" blue="0.80000000000000004" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
</systemColor>
<systemColor name="systemGray4Color">
<color red="0.81960784313725488" green="0.81960784313725488" blue="0.83921568627450982" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
</systemColor>
</resources> </resources>
</document> </document>
...@@ -109,7 +109,14 @@ static int AlbumColumnCount = 4; ...@@ -109,7 +109,14 @@ static int AlbumColumnCount = 4;
[self.dynamicView refreshAfterDelete:tag]; [self.dynamicView refreshAfterDelete:tag];
} }
- (void)enterBindMobile {
// 3、进入绑定手机页面
UIViewController *bindVC = [[UIStoryboard storyboardWithName:@"BindMobileController" bundle:nil] instantiateViewControllerWithIdentifier:@"BindMobileController"];
[self.navigationController pushViewController:bindVC animated:YES];
}
- (void)publishDynamic { - (void)publishDynamic {
// 4、发布动态请求
[DSProgressHUD showProgressHUDWithInfo:@""]; [DSProgressHUD showProgressHUDWithInfo:@""];
[self.dynamicVM publishDynamicWithCompletion:^(DynamicViewModel * _Nonnull viewModel) { [self.dynamicVM publishDynamicWithCompletion:^(DynamicViewModel * _Nonnull viewModel) {
[DSProgressHUD dissmissProgressHUD]; [DSProgressHUD dissmissProgressHUD];
......
...@@ -17,6 +17,8 @@ NS_ASSUME_NONNULL_BEGIN ...@@ -17,6 +17,8 @@ NS_ASSUME_NONNULL_BEGIN
- (void)previewPicture:(NSIndexPath *)indexPath; - (void)previewPicture:(NSIndexPath *)indexPath;
/// 删除图片 /// 删除图片
- (void)deletePicture:(NSInteger)tag; - (void)deletePicture:(NSInteger)tag;
/// 进入绑定手机页面
- (void)enterBindMobile;
/// 发布动态 /// 发布动态
- (void)publishDynamic; - (void)publishDynamic;
@end @end
......
...@@ -8,13 +8,15 @@ ...@@ -8,13 +8,15 @@
#import "DynamicView.h" #import "DynamicView.h"
#import "MKPPlaceholderTextView.h" #import "MKPPlaceholderTextView.h"
#import "FeedImageCollectionCell.h" #import "FeedImageCollectionCell.h"
#import "ConfirmBox.h"
@interface DynamicView () <UITextViewDelegate, UICollectionViewDataSource, UICollectionViewDelegate> @interface DynamicView () <UITextViewDelegate, UICollectionViewDataSource, UICollectionViewDelegate, ConfirmBoxDelegate>
@property (strong, nonatomic) MKPPlaceholderTextView *textView; @property (strong, nonatomic) MKPPlaceholderTextView *textView;
@property (strong, nonatomic) UILabel *wordLimitLab; @property (strong, nonatomic) UILabel *wordLimitLab;
@property (strong, nonatomic) UICollectionView *imgCollectionView; @property (strong, nonatomic) UICollectionView *imgCollectionView;
@property (strong, nonatomic) UIButton *publishBtn; @property (strong, nonatomic) UIButton *publishBtn;
@property (strong, nonatomic) DynamicViewModel *dynamicVM; @property (strong, nonatomic) DynamicViewModel *dynamicVM;
@property (nonatomic, strong) ConfirmBox *bindMobileConfirmBox;
@end @end
@implementation DynamicView @implementation DynamicView
...@@ -57,8 +59,16 @@ ...@@ -57,8 +59,16 @@
return self; return self;
} }
#pragma mark - private
- (void)publishAction { - (void)publishAction {
if (self.dynamicVM.selectedPhotos.count || self.textView.text.length) { if (self.dynamicVM.selectedPhotos.count || self.textView.text.length) {
// 1、登录了,判断是否绑定了手机号
#warning warning - 临时测试
if ([LoginUtils getUserMobile]) {
// 2、弹出绑定手机提示框框
[self.bindMobileConfirmBox show];
return;
}
if (self.delegate && [self.delegate respondsToSelector:@selector(publishDynamic)]) { if (self.delegate && [self.delegate respondsToSelector:@selector(publishDynamic)]) {
[self.delegate publishDynamic]; [self.delegate publishDynamic];
} }
...@@ -87,6 +97,14 @@ ...@@ -87,6 +97,14 @@
}]; }];
} }
#pragma mark - ConfirmBoxDelegate
- (void)jumpToBindMobilePage {
[self.bindMobileConfirmBox dismiss];
if (self.delegate && [self.delegate respondsToSelector:@selector(enterBindMobile)]) {
[self.delegate enterBindMobile];
}
}
#pragma mark - UITextViewDelegate #pragma mark - UITextViewDelegate
- (void)textViewDidEndEditing:(UITextView *)textView { - (void)textViewDidEndEditing:(UITextView *)textView {
[self dealWorldLimitAttTextWithChangeLength:(int)textView.text.length]; [self dealWorldLimitAttTextWithChangeLength:(int)textView.text.length];
...@@ -152,13 +170,13 @@ ...@@ -152,13 +170,13 @@
if (!_textView) { if (!_textView) {
_textView = [[MKPPlaceholderTextView alloc] init]; _textView = [[MKPPlaceholderTextView alloc] init];
_textView.dk_backgroundColorPicker = DKColorPickerWithColors(ColorFromHex(0xf0f0f0), CornerViewDarkColor, DSWhite); _textView.dk_backgroundColorPicker = DKColorPickerWithColors(ColorFromHex(0xf0f0f0), CornerViewDarkColor, DSWhite);
_textView.dk_textColorPicker = DKColorPickerWithColors(SubTitleColor, DarkTextColor, DSWhite); _textView.dk_textColorPicker = DKColorPickerWithColors(SubTitleColor, ColorFromHexA(0xFFFFFF, .5), DSWhite);
_textView.font = SysFont(14); _textView.font = SysFont(14);
_textView.delegate = self; _textView.delegate = self;
[_textView cornerRadius:12]; [_textView cornerRadius:12];
_textView.textContainerInset = UIEdgeInsetsMake(15, 8, 40, 8); _textView.textContainerInset = UIEdgeInsetsMake(15, 8, 40, 8);
_textView.placeholder = @"请文明发言,不可涉及黄、赌、毒、国家政治相关动态!"; _textView.placeholder = @"请文明发言,不可涉及黄、赌、毒、国家政治相关动态!";
_textView.placeholderLabel.dk_textColorPicker = DKColorPickerWithColors(UIColor.lightGrayColor, DSWhite, DSWhite); _textView.placeholderLabel.dk_textColorPicker = DKColorPickerWithColors(ColorFromHexA(0x777777, .3), ColorFromHexA(0xFFFFFF, .3), DSWhite);
} }
return _textView; return _textView;
} }
...@@ -202,4 +220,11 @@ ...@@ -202,4 +220,11 @@
return _publishBtn; return _publishBtn;
} }
- (ConfirmBox *)bindMobileConfirmBox {
if (!_bindMobileConfirmBox) {
_bindMobileConfirmBox = [[ConfirmBox alloc] initWithDelegate:self type:ConfirmBoxTypeBindMobile];
}
return _bindMobileConfirmBox;
}
@end @end
...@@ -99,6 +99,8 @@ ...@@ -99,6 +99,8 @@
[self.myDynVM deleteComDynWithDynamicID:self.myDynVM.delete_id]; [self.myDynVM deleteComDynWithDynamicID:self.myDynVM.delete_id];
[self.myDynamicView deleteSuccess]; [self.myDynamicView deleteSuccess];
[self.myDynamicView updateListView]; [self.myDynamicView updateListView];
// 刷新社区动态列表
[[NSNotificationCenter defaultCenter] postNotificationName:NeedUpdateComList object:nil];
} else { } else {
[DSProgressHUD showToast:requestModel.errMessage]; [DSProgressHUD showToast:requestModel.errMessage];
} }
......
...@@ -158,7 +158,7 @@ ...@@ -158,7 +158,7 @@
- (ConfirmBox *)deleteConfirmBox { - (ConfirmBox *)deleteConfirmBox {
if (!_deleteConfirmBox) { if (!_deleteConfirmBox) {
_deleteConfirmBox = [[ConfirmBox alloc] initWithDelegate:self]; _deleteConfirmBox = [[ConfirmBox alloc] initWithDelegate:self type:ConfirmBoxTypeDynDelete];
} }
return _deleteConfirmBox; return _deleteConfirmBox;
} }
......
...@@ -9,19 +9,33 @@ ...@@ -9,19 +9,33 @@
NS_ASSUME_NONNULL_BEGIN NS_ASSUME_NONNULL_BEGIN
// 确认框类型
typedef NS_ENUM(int, ConfirmBoxType) {
ConfirmBoxTypeDynDelete, // 个人动态删除
ConfirmBoxTypeBindMobile // 绑定手机
};
@protocol ConfirmBoxDelegate <NSObject> @protocol ConfirmBoxDelegate <NSObject>
@optional
/// 执行确认删除操作 /// 执行确认删除操作
/// @param indexPath indexPath /// @param indexPath indexPath
- (void)excuteDeleteAction:(NSIndexPath *)indexPath; - (void)excuteDeleteAction:(NSIndexPath *)indexPath;
/// 跳转到绑定手机页面
- (void)jumpToBindMobilePage;
@end @end
/// 确认框 /// 确认框
@interface ConfirmBox : UIView @interface ConfirmBox : UIView
@property (nonatomic, weak) id<ConfirmBoxDelegate> delegate; @property (nonatomic, weak) id<ConfirmBoxDelegate> delegate;
- (instancetype)initWithDelegate:(id<ConfirmBoxDelegate>)delegate; - (instancetype)initWithDelegate:(id<ConfirmBoxDelegate>)delegate type:(ConfirmBoxType)type;
- (void)showConfirmBox:(NSIndexPath *)indexPath; - (void)showConfirmBox:(NSIndexPath *)indexPath;
- (void)show;
- (void)dismiss; - (void)dismiss;
@end @end
......
...@@ -8,6 +8,7 @@ ...@@ -8,6 +8,7 @@
#import "ConfirmBox.h" #import "ConfirmBox.h"
@interface ConfirmBox () @interface ConfirmBox ()
@property (nonatomic, assign) ConfirmBoxType boxType;
@property (nonatomic, strong) UIView *alertView; @property (nonatomic, strong) UIView *alertView;
@property (nonatomic, strong) UILabel *titleLab; @property (nonatomic, strong) UILabel *titleLab;
@property (nonatomic, strong) UILabel *detailLab; @property (nonatomic, strong) UILabel *detailLab;
...@@ -19,9 +20,10 @@ ...@@ -19,9 +20,10 @@
NSIndexPath * _tmpIndexPath; NSIndexPath * _tmpIndexPath;
} }
- (instancetype)initWithDelegate:(id<ConfirmBoxDelegate>)delegate { - (instancetype)initWithDelegate:(id<ConfirmBoxDelegate>)delegate type:(ConfirmBoxType)type {
if (self = [super initWithFrame:[UIScreen mainScreen].bounds]) { if (self = [super initWithFrame:[UIScreen mainScreen].bounds]) {
_delegate = delegate; _delegate = delegate;
self.boxType = type;
self.backgroundColor = ColorFromHexA(0x161E38, .6); self.backgroundColor = ColorFromHexA(0x161E38, .6);
[self addSubview:self.alertView]; [self addSubview:self.alertView];
...@@ -40,14 +42,24 @@ ...@@ -40,14 +42,24 @@
[DSKeyWindow addSubview:self]; [DSKeyWindow addSubview:self];
} }
- (void)show {
[DSKeyWindow addSubview:self];
}
- (void)dismiss { - (void)dismiss {
[self removeFromSuperview]; [self removeFromSuperview];
} }
#pragma mark - private #pragma mark - private
- (void)sureAction { - (void)sureAction {
if (self.delegate && [self.delegate respondsToSelector:@selector(excuteDeleteAction:)]) { if (self.boxType == ConfirmBoxTypeDynDelete) {
[self.delegate excuteDeleteAction:_tmpIndexPath]; if (self.delegate && [self.delegate respondsToSelector:@selector(excuteDeleteAction:)]) {
[self.delegate excuteDeleteAction:_tmpIndexPath];
}
} else if (self.boxType == ConfirmBoxTypeBindMobile) {
if (self.delegate && [self.delegate respondsToSelector:@selector(jumpToBindMobilePage)]) {
[self.delegate jumpToBindMobilePage];
}
} }
} }
...@@ -74,6 +86,8 @@ ...@@ -74,6 +86,8 @@
[self.detailLab mas_makeConstraints:^(MASConstraintMaker *make) { [self.detailLab mas_makeConstraints:^(MASConstraintMaker *make) {
make.centerX.equalTo(_alertView); make.centerX.equalTo(_alertView);
make.top.equalTo(_alertView).offset(62); make.top.equalTo(_alertView).offset(62);
make.left.equalTo(_alertView).offset(16);
make.right.equalTo(_alertView).offset(-16);
}]; }];
[self.cancelBtn mas_makeConstraints:^(MASConstraintMaker *make) { [self.cancelBtn mas_makeConstraints:^(MASConstraintMaker *make) {
make.left.bottom.equalTo(_alertView); make.left.bottom.equalTo(_alertView);
...@@ -104,9 +118,22 @@ ...@@ -104,9 +118,22 @@
- (UILabel *)detailLab { - (UILabel *)detailLab {
if (!_detailLab) { if (!_detailLab) {
_detailLab = [UILabel labWithText:@"您确定要删除该动态吗?" font:SysFont(15) fit:YES]; NSString *text = @"";
_detailLab.dk_textColorPicker = DKColorPickerWithKey(Dk_TITLE); UIFont *font = SysFont(15);
NSInteger numberOfLines = 1;
DKColorPicker dkColor = DKColorPickerWithKey(Dk_TITLE);
if (self.boxType == ConfirmBoxTypeDynDelete) {
text = @"您确定要删除该动态吗?";
} else if (self.boxType == ConfirmBoxTypeBindMobile) {
text = @"根据网信办规定及《网络安全法》要求,需要您进行手机号绑定";
font = SysFont(14);
dkColor = DKColorPickerWithColors(SubTitleColor, ColorFromHexA(0xFFFFFF, .5), DSWhite);
numberOfLines = 0;
}
_detailLab = [UILabel labWithText:text font:font fit:YES];
_detailLab.dk_textColorPicker = dkColor;
_detailLab.textAlignment = NSTextAlignmentCenter; _detailLab.textAlignment = NSTextAlignmentCenter;
_detailLab.numberOfLines = numberOfLines;
} }
return _detailLab; return _detailLab;
} }
...@@ -122,8 +149,16 @@ ...@@ -122,8 +149,16 @@
- (UIButton *)sureBtn { - (UIButton *)sureBtn {
if (!_sureBtn) { if (!_sureBtn) {
_sureBtn = [UIButton btnWithTitle:@"确定" font:SysFont(15)]; NSString *title = @"";
[_sureBtn dk_setTitleColorPicker:DKColorPickerWithKey(Dk_TITLE) forState:UIControlStateNormal]; DKColorPicker dkColor = DKColorPickerWithKey(Dk_TITLE);
if (self.boxType == ConfirmBoxTypeDynDelete) {
title = @"确定";
} else if (self.boxType == ConfirmBoxTypeBindMobile) {
title = @"绑定";
dkColor = DKColorPickerWithKey(BrandBG);
}
_sureBtn = [UIButton btnWithTitle:title font:SysFont(15)];
[_sureBtn dk_setTitleColorPicker:dkColor forState:UIControlStateNormal];
[_sureBtn addTarget:self action:@selector(sureAction) forControlEvents:UIControlEventTouchUpInside]; [_sureBtn addTarget:self action:@selector(sureAction) forControlEvents:UIControlEventTouchUpInside];
} }
return _sureBtn; return _sureBtn;
......
{
"images" : [
{
"filename" : "dk_ic_bangding_shouji.png",
"idiom" : "universal",
"scale" : "1x"
},
{
"filename" : "dk_ic_bangding_shouji@2x.png",
"idiom" : "universal",
"scale" : "2x"
},
{
"filename" : "dk_ic_bangding_shouji@3x.png",
"idiom" : "universal",
"scale" : "3x"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}
{
"images" : [
{
"filename" : "dk_ic_bangding_xiala.png",
"idiom" : "universal",
"scale" : "1x"
},
{
"filename" : "dk_ic_bangding_xiala@2x.png",
"idiom" : "universal",
"scale" : "2x"
},
{
"filename" : "dk_ic_bangding_xiala@3x.png",
"idiom" : "universal",
"scale" : "3x"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}
{
"images" : [
{
"filename" : "ic_bangding_shouji.png",
"idiom" : "universal",
"scale" : "1x"
},
{
"filename" : "ic_bangding_shouji@2x.png",
"idiom" : "universal",
"scale" : "2x"
},
{
"filename" : "ic_bangding_shouji@3x.png",
"idiom" : "universal",
"scale" : "3x"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}
{
"images" : [
{
"filename" : "ic_bangding_xiala.png",
"idiom" : "universal",
"scale" : "1x"
},
{
"filename" : "ic_bangding_xiala@2x.png",
"idiom" : "universal",
"scale" : "2x"
},
{
"filename" : "ic_bangding_xiala@3x.png",
"idiom" : "universal",
"scale" : "3x"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}
支持 Markdown 格式
你添加了 0 到此讨论。请谨慎行事。
Finish editing this message first!