Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
C
colorfulSchoolReconsitution
Project
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
2
Merge Requests
2
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
刘卓鑫
colorfulSchoolReconsitution
Commits
c32cb351
Commit
c32cb351
authored
Aug 23, 2019
by
刘卓鑫
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改首页 首充 强弹的公告弹出动画
parent
95ea42bd
Show whitespace changes
Inline
Side-by-side
Showing
17 changed files
with
664 additions
and
77 deletions
+664
-77
project.pbxproj
ColorfulSchool/ColorfulSchool.xcodeproj/project.pbxproj
+20
-0
UserInterfaceState.xcuserstate
...ata/liuzhuoxin.xcuserdatad/UserInterfaceState.xcuserstate
+0
-0
AppDelegate.m
ColorfulSchool/ColorfulSchool/AppDelegate.m
+1
-1
ZXHomePageViewController.m
...ge(首页)/0801HomePage/Controller/ZXHomePageViewController.m
+21
-5
ZXHomePageAnnouceCell.m
...ePage(首页)/0801HomePage/View/Cells/ZXHomePageAnnouceCell.m
+3
-3
ZXHomePaeFirstRecahrgeView.m
...801HomePage/View/customViews/ZXHomePaeFirstRecahrgeView.m
+2
-2
ZXHomePageAnnounceView.m
...页)/0801HomePage/View/customViews/ZXHomePageAnnounceView.m
+4
-4
UseEquipmentController.m
...(1.0购券)/UserEquipment/Controller/UseEquipmentController.m
+25
-23
forgetPasswordViewController.m
.../ForgetPassword/Controller/forgetPasswordViewController.m
+11
-6
ZXRegistorViewController.m
...ogin(登录注册)/Register/Controller/ZXRegistorViewController.m
+4
-1
updateViewController.m
.../ChangePasswordAndPhone/Controller/updateViewController.m
+5
-3
ZXPopAnimationTool.h
...hool/ColorfulSchool/Classes/Tool(工具)/ZXPopAnimationTool.h
+34
-0
ZXPopAnimationTool.m
...hool/ColorfulSchool/Classes/Tool(工具)/ZXPopAnimationTool.m
+32
-0
ZXTool.m
ColorfulSchool/ColorfulSchool/Classes/Tool(工具)/ZXTool.m
+4
-6
ZJAnimationPopView.h
...lasses/Vendor(三方)/ZJAnimationPopView/ZJAnimationPopView.h
+86
-0
ZJAnimationPopView.m
...lasses/Vendor(三方)/ZJAnimationPopView/ZJAnimationPopView.m
+411
-0
PrefixHeader.pch
ColorfulSchool/ColorfulSchool/PrefixHeader.pch
+1
-23
No files found.
ColorfulSchool/ColorfulSchool.xcodeproj/project.pbxproj
View file @
c32cb351
...
...
@@ -46,6 +46,8 @@
1C5B26B8225B3B7B001B0E1B
/* ZXSettingViewController.m in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
1C5B26B7225B3B7B001B0E1B
/* ZXSettingViewController.m */
;
};
1C5B26BB225B3B85001B0E1B
/* ZXUserSettingTableViewCell.m in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
1C5B26B9225B3B83001B0E1B
/* ZXUserSettingTableViewCell.m */
;
};
1C5B26BE225B3B8F001B0E1B
/* ZXUserSettingModel.m in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
1C5B26BC225B3B8E001B0E1B
/* ZXUserSettingModel.m */
;
};
1C642757230FBB5E00AEC294
/* ZJAnimationPopView.m in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
1C642755230FBB5D00AEC294
/* ZJAnimationPopView.m */
;
};
1C64275A230FBF3200AEC294
/* ZXPopAnimationTool.m in Sources */
=
{
isa
=
PBXBuildFile
;
fileRef
=
1C642759230FBF3200AEC294
/* ZXPopAnimationTool.m */
;
};
1C73BEED22439F8D0078947F
/* SafariServices.framework in Frameworks */
=
{
isa
=
PBXBuildFile
;
fileRef
=
1C73BEEC22439F8C0078947F
/* SafariServices.framework */
;
};
1C73BEEF2243A0080078947F
/* EventKit.framework in Frameworks */
=
{
isa
=
PBXBuildFile
;
fileRef
=
1C73BEEE2243A0070078947F
/* EventKit.framework */
;
};
1C73BEFB22447DA90078947F
/* MessageUI.framework in Frameworks */
=
{
isa
=
PBXBuildFile
;
fileRef
=
1C73BEFA22447DA90078947F
/* MessageUI.framework */
;
};
...
...
@@ -761,6 +763,10 @@
1C5B26BA225B3B84001B0E1B
/* ZXUserSettingTableViewCell.h */
=
{
isa
=
PBXFileReference
;
fileEncoding
=
4
;
lastKnownFileType
=
sourcecode.c.h
;
path
=
ZXUserSettingTableViewCell.h
;
sourceTree
=
"<group>"
;
};
1C5B26BC225B3B8E001B0E1B
/* ZXUserSettingModel.m */
=
{
isa
=
PBXFileReference
;
fileEncoding
=
4
;
lastKnownFileType
=
sourcecode.c.objc
;
path
=
ZXUserSettingModel.m
;
sourceTree
=
"<group>"
;
};
1C5B26BD225B3B8F001B0E1B
/* ZXUserSettingModel.h */
=
{
isa
=
PBXFileReference
;
fileEncoding
=
4
;
lastKnownFileType
=
sourcecode.c.h
;
path
=
ZXUserSettingModel.h
;
sourceTree
=
"<group>"
;
};
1C642755230FBB5D00AEC294
/* ZJAnimationPopView.m */
=
{
isa
=
PBXFileReference
;
fileEncoding
=
4
;
lastKnownFileType
=
sourcecode.c.objc
;
path
=
ZJAnimationPopView.m
;
sourceTree
=
"<group>"
;
};
1C642756230FBB5D00AEC294
/* ZJAnimationPopView.h */
=
{
isa
=
PBXFileReference
;
fileEncoding
=
4
;
lastKnownFileType
=
sourcecode.c.h
;
path
=
ZJAnimationPopView.h
;
sourceTree
=
"<group>"
;
};
1C642758230FBF3200AEC294
/* ZXPopAnimationTool.h */
=
{
isa
=
PBXFileReference
;
lastKnownFileType
=
sourcecode.c.h
;
path
=
ZXPopAnimationTool.h
;
sourceTree
=
"<group>"
;
};
1C642759230FBF3200AEC294
/* ZXPopAnimationTool.m */
=
{
isa
=
PBXFileReference
;
lastKnownFileType
=
sourcecode.c.objc
;
path
=
ZXPopAnimationTool.m
;
sourceTree
=
"<group>"
;
};
1C73BEEC22439F8C0078947F
/* SafariServices.framework */
=
{
isa
=
PBXFileReference
;
lastKnownFileType
=
wrapper.framework
;
name
=
SafariServices.framework
;
path
=
System/Library/Frameworks/SafariServices.framework
;
sourceTree
=
SDKROOT
;
};
1C73BEEE2243A0070078947F
/* EventKit.framework */
=
{
isa
=
PBXFileReference
;
lastKnownFileType
=
wrapper.framework
;
name
=
EventKit.framework
;
path
=
System/Library/Frameworks/EventKit.framework
;
sourceTree
=
SDKROOT
;
};
1C73BEF822447CB40078947F
/* BaiduMobAdSDK */
=
{
isa
=
PBXFileReference
;
lastKnownFileType
=
archive.ar
;
name
=
BaiduMobAdSDK
;
path
=
"ColorfulSchool/Classes/百度广告/BaiduMobAdSDK.framework/BaiduMobAdSDK"
;
sourceTree
=
"<group>"
;
};
...
...
@@ -2098,6 +2104,15 @@
path
=
ViewModel
;
sourceTree
=
"<group>"
;
};
1C642754230FBB5D00AEC294
/* ZJAnimationPopView */
=
{
isa
=
PBXGroup
;
children
=
(
1C642756230FBB5D00AEC294
/* ZJAnimationPopView.h */
,
1C642755230FBB5D00AEC294
/* ZJAnimationPopView.m */
,
);
path
=
ZJAnimationPopView
;
sourceTree
=
"<group>"
;
};
1C8853F922C1B08A00A03328
/* appointmentBath(预约洗浴) */
=
{
isa
=
PBXGroup
;
children
=
(
...
...
@@ -4062,6 +4077,8 @@
A7DECC752079F0E20039EC22
/* ZXPayManager.m */
,
A7DECC762079F0E20039EC22
/* ZXTool.h */
,
A7DECC772079F0E20039EC22
/* ZXTool.m */
,
1C642758230FBF3200AEC294
/* ZXPopAnimationTool.h */
,
1C642759230FBF3200AEC294
/* ZXPopAnimationTool.m */
,
);
path
=
"Tool(工具)"
;
sourceTree
=
"<group>"
;
...
...
@@ -4069,6 +4086,7 @@
A7DECC7A2079F0E20039EC22
/* Vendor(三方) */
=
{
isa
=
PBXGroup
;
children
=
(
1C642754230FBB5D00AEC294
/* ZJAnimationPopView */
,
1CB3AC1023053BE0006F1724
/* CropImage */
,
1C3AE7B722F0482D0045C969
/* SGQRCode */
,
1CD9E566229B7C7500FFDA29
/* JDSDK */
,
...
...
@@ -5150,6 +5168,7 @@
22E36C931F558D1B00073AC2
/* FetchWalletTopUpDataModel.m in Sources */
,
A75436E921D34594005584CC
/* CampasVersionUpdateModel.m in Sources */
,
A7F3E17421B5330F00010E23
/* HTTPMessage.m in Sources */
,
1C642757230FBB5E00AEC294
/* ZJAnimationPopView.m in Sources */
,
A7EC706C20EC9867001504C5
/* ZXWashOrderModel.m in Sources */
,
A705BFC021D4AFD8004F1628
/* HTTPErrorResponse.m in Sources */
,
A7FE8D7020C8DD8C0028B721
/* ZTHomeViewController.m in Sources */
,
...
...
@@ -5335,6 +5354,7 @@
A7FE8D7620C8F7D30028B721
/* New_OperationCell.m in Sources */
,
A783E4452109BC650074623C
/* ChineseString.m in Sources */
,
A75436E821D34594005584CC
/* UpdateVersionModel.m in Sources */
,
1C64275A230FBF3200AEC294
/* ZXPopAnimationTool.m in Sources */
,
A7F3E00E21B530F500010E23
/* ZXColorfulTopController.m in Sources */
,
1CF86307230280FB0007EBC6
/* AppUpdateVersion.m in Sources */
,
A756C5CB21FAA6050006E418
/* SDCycleScrollView.m in Sources */
,
...
...
ColorfulSchool/ColorfulSchool.xcworkspace/xcuserdata/liuzhuoxin.xcuserdatad/UserInterfaceState.xcuserstate
0 → 100644
View file @
c32cb351
File added
ColorfulSchool/ColorfulSchool/AppDelegate.m
View file @
c32cb351
...
...
@@ -67,7 +67,7 @@
[
self
defaultLauchConfigAndIsOpenPreventCrashManager
:
YES
];
//启动环境
[
APIManager
sharedAPIManager
].
lauchEnvironment
=
ZXColorfulSchoolEnvironment
Produc
t
;
[
APIManager
sharedAPIManager
].
lauchEnvironment
=
ZXColorfulSchoolEnvironment
Tes
t
;
//极光推送
[
self
initPushWithOptions
:
launchOptions
isProduct
:
YES
];
...
...
ColorfulSchool/ColorfulSchool/Classes/HomePage(首页)/0801HomePage/Controller/ZXHomePageViewController.m
View file @
c32cb351
//
//
...
...
@@ -34,6 +34,7 @@
#import "AimiWalletViewController.h"
#import "enlargeClickRegionBtn.h"
#import "CropImageController.h"
#import "ZJAnimationPopView.h"
@interface
ZXHomePageViewController
()
<
UITableViewDelegate
,
UITableViewDataSource
,
UINavigationControllerDelegate
,
UIImagePickerControllerDelegate
,
CropImageDelegate
>
/** tableview */
@property
(
nonatomic
,
strong
)
UITableView
*
myTableView
;
...
...
@@ -213,16 +214,23 @@
kWeakSelf
(
self
);
self
.
announce
=
[[
ZXHomePageAnnounceView
alloc
]
initWithFrame
:[
UIScreen
mainScreen
].
bounds
jumpUrl
:
@""
];
self
.
announce
.
htmlStr
=
info
.
content
;
self
.
announce
.
comfirm
=
^
(
BOOL
isNotAlert
)
{
ZJAnimationPopView
*
popView
=
[
ZXPopAnimationTool
showPopView
:
self
.
announce
fatherView
:
self
.
tabBarController
.
view
popStyle
:
ZJAnimationPopStyleShakeFromBottom
dismissStyle
:
ZJAnimationDismissStyleScale
popComplete
:^
{
}
dismissComplete
:^
{
kStrongSelf
(
self
);
self
.
announce
.
hidden
=
YES
;
self
.
announce
=
nil
;
}];
kWeakSelf
(
popView
);
self
.
announce
.
comfirm
=
^
(
BOOL
isNotAlert
)
{
kStrongSelf
(
self
);
[
weakpopView
dismiss
];
if
(
isNotAlert
)
{
//不在提示
[
self
.
service
notShowAlertAnnounceByNoticeCode
:
info
.
noticeCode
];
}
};
[
self
.
tabBarController
.
view
addSubview
:
self
.
announce
];
}
-
(
NSInteger
)
numberOfSectionsInTableView
:
(
UITableView
*
)
tableView
{
...
...
@@ -557,16 +565,24 @@
}
@weakify
(
self
);
ZJAnimationPopView
*
popView
;
kWeakSelf
(
popView
);
ZXHomePaeFirstRecahrgeView
*
firstRechargeView
=
[[
ZXHomePaeFirstRecahrgeView
alloc
]
initWithFirstRechargeDesc
:
msg
rightAction
:
^
{
@strongify
(
self
);
[
weakpopView
dismiss
];
self
.
isShowFirstRecharge
=
NO
;
AimiWalletViewController
*
view
=
[[
AimiWalletViewController
alloc
]
init
];
view
.
hidesBottomBarWhenPushed
=
YES
;
view
.
comeFrom
=
@"firstTopUp"
;
view
.
comeFrom
=
@"firstTopUp"
;
[
self
.
navigationController
pushViewController
:
view
animated
:
YES
];
}];
firstRechargeView
.
frame
=
[
UIScreen
mainScreen
].
bounds
;
[
self
.
tabBarController
.
view
addSubview
:
firstRechargeView
];
popView
=
[
ZXPopAnimationTool
showPopView
:
firstRechargeView
fatherView
:
self
.
tabBarController
.
view
popStyle
:
ZJAnimationPopStyleShakeFromBottom
dismissStyle
:
ZJAnimationDismissStyleScale
popComplete
:^
{
}
dismissComplete
:^
{
}];
}
-
(
void
)
createNotPayAndAnnouceView
{
//待支付订单view
...
...
ColorfulSchool/ColorfulSchool/Classes/HomePage(首页)/0801HomePage/View/Cells/ZXHomePageAnnouceCell.m
View file @
c32cb351
//
//
...
...
@@ -68,12 +68,12 @@
make
.
left
.
equalTo
(
imageV
).
offset
(
10
*
k6Scale
);
make
.
top
.
equalTo
(
imageV
.
mas_top
);
make
.
right
.
equalTo
(
imageV
).
offset
(
-
10
*
k6Scale
);
make
.
height
.
mas_equalTo
(
14
0
*
k6Scale
);
make
.
height
.
mas_equalTo
(
14
4
*
k6Scale
);
}];
[
self
.
dateCountLabel
mas_makeConstraints
:
^
(
MASConstraintMaker
*
make
)
{
make
.
right
.
equalTo
(
imageV
.
mas_right
).
offset
(
-
20
*
k6Scale
);
make
.
top
.
equalTo
(
self
.
ContentImageView
.
mas_bottom
).
offset
(
1
5
*
k6Scale
);
make
.
top
.
equalTo
(
self
.
ContentImageView
.
mas_bottom
).
offset
(
1
2
*
k6Scale
);
}];
[
self
.
contentLabel
mas_makeConstraints
:
^
(
MASConstraintMaker
*
make
)
{
...
...
ColorfulSchool/ColorfulSchool/Classes/HomePage(首页)/0801HomePage/View/customViews/ZXHomePaeFirstRecahrgeView.m
View file @
c32cb351
//
//
...
...
@@ -13,7 +13,7 @@
-
(
instancetype
)
initWithFirstRechargeDesc
:(
NSString
*
)
rechargeDesc
rightAction
:
(
dispatch_block_t
)
rightAction
{
if
(
self
=
[
super
init
])
{
self
.
backgroundColor
=
[[
UIColor
blackColor
]
colorWithAlphaComponent
:
0
.
4
];
//
self.backgroundColor = [[UIColor blackColor] colorWithAlphaComponent:0.4];
UIView
*
bgView
=
[[
UIView
alloc
]
init
];
bgView
.
backgroundColor
=
[
UIColor
whiteColor
];
kViewRadius
(
bgView
,
7
*
k6Scale
);
...
...
ColorfulSchool/ColorfulSchool/Classes/HomePage(首页)/0801HomePage/View/customViews/ZXHomePageAnnounceView.m
View file @
c32cb351
...
...
@@ -26,7 +26,7 @@
-
(
instancetype
)
initWithFrame
:(
CGRect
)
frame
jumpUrl
:(
NSString
*
)
jumpUrl
{
if
(
self
=
[
super
initWithFrame
:
frame
])
{
self
.
backgroundColor
=
[
UIColor
colorWithRed
:
0
green
:
0
blue
:
0
alpha
:
.
2
];
//
self.backgroundColor = [UIColor colorWithRed:0 green:0 blue:0 alpha:.2];
UIView
*
bgView
=
[[
UIView
alloc
]
initWithFrame
:
CGRectMake
(
40
*
k6Scale
,
85
*
k6Scale
,
kScreenWidth
-
80
*
k6Scale
,
kScreenHeight
-
170
*
k6Scale
)];
...
...
@@ -115,8 +115,8 @@
}
#pragma mark - ==========确定事件==========
-
(
void
)
okAction
:
(
UIButton
*
)
sender
{
self
.
hidden
=
YES
;
[
self
removeFromSuperview
];
//
self.hidden =YES;
//
[self removeFromSuperview];
if
(
self
.
comfirm
)
{
self
.
comfirm
(
self
.
agreedBtn
.
selected
);
}
...
...
ColorfulSchool/ColorfulSchool/Classes/HomePage(首页)/Operation(自助服务)/1.0Version(1.0购券)/UserEquipment/Controller/UseEquipmentController.m
View file @
c32cb351
//
//
...
...
@@ -290,23 +290,23 @@ heightForFooterInSection:(NSInteger)section
TicketItem
*
deltTicketItem
=
self
.
fetchTicketDeviceModel
.
ticketAndDevieceItem
.
userCouponList
[
deleteRow
-
1000
];
if
(
_
alert
!=
nil
)
{
[
_
alert
removeFromSuperview
];
_
alert
=
nil
;
if
(
self
.
alert
!=
nil
)
{
[
self
.
alert
removeFromSuperview
];
self
.
alert
=
nil
;
}
_
alert
=
[[
DeleteAlertView
alloc
]
initWithFrame
:
CGRectMake
(
0
,
0
,
kWidth
,
kHeight
)];
_
alert
.
message
=
[
NSString
stringWithFormat
:
@"是否确定删除%@券"
,
self
.
equipItem
.
serviceName
]
;
self
.
alert
=
[[
DeleteAlertView
alloc
]
initWithFrame
:
CGRectMake
(
0
,
0
,
kWidth
,
kHeight
)];
self
.
alert
.
message
=
[
NSString
stringWithFormat
:
@"是否确定删除%@券"
,
self
.
equipItem
.
serviceName
]
;
__weak
typeof
(
self
)
weakSelf
=
self
;
[
_
alert
setOkClick
:
^
{
[
self
.
alert
setOkClick
:
^
{
weakSelf
.
isFromDeleteSV
=
YES
;
[
weakSelf
.
delTicketModel
deleteTicketWithStrNo
:
deltTicketItem
.
strNo
];
[
weakSelf
.
alert
removeFromSuperview
];
}];
AppDelegate
*
app
=
(
AppDelegate
*
)[
UIApplication
sharedApplication
].
delegate
;
[
app
.
window
addSubview
:
_
alert
];
[
app
.
window
addSubview
:
self
.
alert
];
[
_
alert
mas_makeConstraints
:
^
(
MASConstraintMaker
*
make
)
{
[
self
.
alert
mas_makeConstraints
:
^
(
MASConstraintMaker
*
make
)
{
make
.
left
.
right
.
top
.
bottom
.
mas_equalTo
(
@
(
0
));
}];
};
...
...
@@ -325,29 +325,31 @@ heightForFooterInSection:(NSInteger)section
[
cell
setUpDevice
:
deviceItem
indexPath
:
indexPath
];
}
kWeakSelf
(
self
);
cell
.
deleteDevice
=^
(
int
deleteRow
){
kStrongSelf
(
self
);
//tag+2000所以此处-2000;
DeviceItem
*
delDeviceItem
=
self
.
fetchTicketDeviceModel
.
ticketAndDevieceItem
.
equipmentList
[
deleteRow
-
2000
];
if
(
_
alert1
!=
nil
)
{
[
_
alert1
removeFromSuperview
];
_
alert1
=
nil
;
if
(
self
.
alert1
!=
nil
)
{
[
self
.
alert1
removeFromSuperview
];
self
.
alert1
=
nil
;
}
_alert1
=
[[
DeleteAlertView
alloc
]
initWithFrame
:
CGRectMake
(
0
,
0
,
kWidth
,
kHeight
)];
_alert1
.
message
=
@"是否确定删除设备"
;
__weak
typeof
(
self
)
weakSelf
=
self
;
[
_alert1
setOkClick
:
^
{
weakSelf
.
isFromDeleteSV
=
YES
;
[
weakSelf
.
delDeviceModel
deleteDvieceWithEquipmentId
:[
NSString
stringWithFormat
:
@"%ld"
,(
long
)
delDeviceItem
.
equipmentId
]];
[
weakSelf
.
alert1
removeFromSuperview
];
self
.
alert1
=
[[
DeleteAlertView
alloc
]
initWithFrame
:
CGRectMake
(
0
,
0
,
kWidth
,
kHeight
)];
self
.
alert1
.
message
=
@"是否确定删除设备"
;
kWeakSelf
(
self
);
[
self
.
alert1
setOkClick
:
^
{
kStrongSelf
(
self
);
self
.
isFromDeleteSV
=
YES
;
[
self
.
delDeviceModel
deleteDvieceWithEquipmentId
:[
NSString
stringWithFormat
:
@"%ld"
,(
long
)
delDeviceItem
.
equipmentId
]];
[
self
.
alert1
removeFromSuperview
];
}];
AppDelegate
*
app
=
(
AppDelegate
*
)[
UIApplication
sharedApplication
].
delegate
;
[
app
.
window
addSubview
:
_
alert1
];
[
_
alert1
mas_makeConstraints
:
^
(
MASConstraintMaker
*
make
)
{
[
app
.
window
addSubview
:
self
.
alert1
];
[
self
.
alert1
mas_makeConstraints
:
^
(
MASConstraintMaker
*
make
)
{
make
.
left
.
right
.
top
.
bottom
.
mas_equalTo
(
@
(
0
));
}];
};
...
...
ColorfulSchool/ColorfulSchool/Classes/Login(登录注册)/ForgetPassword/Controller/forgetPasswordViewController.m
View file @
c32cb351
//
//
...
...
@@ -113,12 +113,14 @@
[
alert
show
];
return
;
}
__weak
typeof
(
self
)
weakSelf
=
self
;
kWeakSelf
(
self
)
;
codeView
=
[[
GraphicsCode
alloc
]
initWithFrame
:
CGRectMake
(
0
,
0
,
kWidth
,
kHeight
)
phoneNum
:
_phoneNumTextFeild
.
text
];
codeView
.
fetchType
=
3
;
codeView
.
checkType
=
@"0"
;
codeView
.
callBack
=
^
(
NSString
*
code
)
{
[
weakSelf
initTimer
];
kStrongSelf
(
self
);
[
self
initTimer
];
[
self
.
checkCodeField
becomeFirstResponder
];
};
[
codeView
show
:
self
];
...
...
@@ -162,8 +164,12 @@
-
(
IBAction
)
showBtn2Click
:
(
id
)
sender
{
[
self
showBtnFucWithShowBtn
:
sender
textField
:
_passwordFeild2
];
}
-
(
IBAction
)
sureBtnClick
:
(
id
)
sender
{
-
(
IBAction
)
sureBtnClick
:
(
UIButton
*
)
sender
{
sender
.
enabled
=
NO
;
dispatch_after
(
dispatch_time
(
DISPATCH_TIME_NOW
,
(
int64_t
)(
1
.
0
*
NSEC_PER_SEC
)),
dispatch_get_main_queue
(),
^
{
sender
.
enabled
=
YES
;
});
[[
UIApplication
sharedApplication
].
keyWindow
endEditing
:
YES
];
if
([
_phoneNumTextFeild
.
text
length
]
==
0
)
{
[
SVProgressHUD
showErrorWithStatus
:
@"请输入手机号"
];
...
...
@@ -218,7 +224,6 @@
[
ZXTool
showText
:
error
];
}
else
{
[
ZXTool
showText
:
@"找回密码成功"
];
[
ZXTool
backToLoginAndOperationInterface
];
}
});
...
...
ColorfulSchool/ColorfulSchool/Classes/Login(登录注册)/Register/Controller/ZXRegistorViewController.m
View file @
c32cb351
//
//
...
...
@@ -499,7 +499,10 @@
GraphicsCode
*
codeView
=
[[
GraphicsCode
alloc
]
initWithFrame
:
CGRectMake
(
0
,
0
,
kWidth
,
kHeight
)
phoneNum
:
self
.
phoneField
.
text
];
codeView
.
fetchType
=
1
;
codeView
.
checkType
=
@"1"
;
kWeakSelf
(
self
);
codeView
.
callBack
=
^
(
NSString
*
code
){
kStrongSelf
(
self
);
[
self
.
violaField
becomeFirstResponder
];
if
([
code
isEqualToString
:
@""
])
{
dispatch_async
(
dispatch_get_main_queue
(),
^
{
NSString
*
S
=
[
ZXTool
getCurrentTime
];
...
...
ColorfulSchool/ColorfulSchool/Classes/MineView(个人中心)/UserSetting/ChangePasswordAndPhone/Controller/updateViewController.m
View file @
c32cb351
//
//
...
...
@@ -265,10 +265,12 @@
codeView
=
[[
GraphicsCode
alloc
]
initWithFrame
:
CGRectMake
(
0
,
0
,
kWidth
,
kHeight
)
phoneNum
:
_phoneNumTextFeild
.
text
];
codeView
.
fetchType
=
4
;
codeView
.
checkType
=
@"1"
;
__weak
typeof
(
self
)
weakself
=
self
;
kWeakSelf
(
self
)
;
codeView
.
callBack
=
^
(
NSString
*
code
)
{
[
weakself
initTimer
];
kStrongSelf
(
self
);
[
self
initTimer
];
[
self
.
checkCodeTextFeild
becomeFirstResponder
];
};
[
codeView
show
:
self
];
...
...
ColorfulSchool/ColorfulSchool/Classes/Tool(工具)/ZXPopAnimationTool.h
0 → 100644
View file @
c32cb351
//
//
// ZXPopAnimationTool.h
// ColorfulSchool
//
// Created by 刘卓鑫 on 2019/8/23.
// Copyright © 2019 Colorful Any Door. All rights reserved.
//
#import <Foundation/Foundation.h>
#import "ZJAnimationPopView.h"
NS_ASSUME_NONNULL_BEGIN
@interface
ZXPopAnimationTool
:
NSObject
/* 动态显示自定义弹窗视图
* showView 需要显示的自定义view
* 动画覆盖的view 默认是根window
* popStyle 动态弹出方式
* dismissStyle 淡出方式
* popComplete 显示完成回调
* dismissComplete 消失完成回调
*/
+
(
ZJAnimationPopView
*
)
showPopView
:(
UIView
*
)
showView
fatherView
:
(
UIView
*
)
fatherView
popStyle
:
(
ZJAnimationPopStyle
)
popStyle
dismissStyle
:
(
ZJAnimationDismissStyle
)
dismissStyle
popComplete
:
(
dispatch_block_t
)
popComplete
dismissComplete
:
(
dispatch_block_t
)
dismissComplete
;
@end
NS_ASSUME_NONNULL_END
ColorfulSchool/ColorfulSchool/Classes/Tool(工具)/ZXPopAnimationTool.m
0 → 100644
View file @
c32cb351
//
//
// ZXPopAnimationTool.m
// ColorfulSchool
//
// Created by 刘卓鑫 on 2019/8/23.
// Copyright © 2019 Colorful Any Door. All rights reserved.
//
#import "ZXPopAnimationTool.h"
@implementation
ZXPopAnimationTool
+
(
ZJAnimationPopView
*
)
showPopView
:(
UIView
*
)
showView
fatherView
:
(
UIView
*
)
fatherView
popStyle
:
(
ZJAnimationPopStyle
)
popStyle
dismissStyle
:
(
ZJAnimationDismissStyle
)
dismissStyle
popComplete
:
(
dispatch_block_t
)
popComplete
dismissComplete
:
(
dispatch_block_t
)
dismissComplete
{
ZJAnimationPopView
*
popView
=
[[
ZJAnimationPopView
alloc
]
initWithCustomView
:
showView
popStyle
:
popStyle
dismissStyle
:
dismissStyle
];
popView
.
fatherView
=
fatherView
;
popView
.
isClickBGDismiss
=
YES
;
popView
.
popBGAlpha
=
0
.
5
f
;
popView
.
isObserverOrientationChange
=
YES
;
popView
.
popComplete
=
popComplete
;
popView
.
dismissComplete
=
dismissComplete
;
//显示
[
popView
pop
];
return
popView
;
}
@end
ColorfulSchool/ColorfulSchool/Classes/Tool(工具)/ZXTool.m
View file @
c32cb351
//
//
...
...
@@ -721,16 +721,14 @@ void ProviderReleaseData (void *info, const void *data, size_t size){
}
+
(
void
)
backToLogin
{
dispatch_async
(
dispatch_get_main_queue
(),
^
{
[
ZXTool
showLoadingAnimation
];
});
dispatch_async
(
dispatch_get_global_queue
(
0
,
0
),
^
{
[
XMGFileTool
removeDirectoryPath
:
CachePath
];
[
ZXNotPay
clearTable
];
[
ExpecptionModel
clearTable
];
[
ZXSections
clearTable
];
[
ZXInformation
clearTable
];
dispatch_async
(
dispatch_get_main_queue
(),
^
{
[
ZXTool
showLoadingAnimation
];
});
NSString
*
appDomainStr
=
[[
NSBundle
mainBundle
]
bundleIdentifier
];
[[
NSUserDefaults
standardUserDefaults
]
removePersistentDomainForName
:
appDomainStr
];
//清空之后 重设api
...
...
ColorfulSchool/ColorfulSchool/Classes/Vendor(三方)/ZJAnimationPopView/ZJAnimationPopView.h
0 → 100755
View file @
c32cb351
//
//
// ZJAnimationPopView.h
// ZJAnimationPopView <https://github.com/Abnerzj/ZJAnimationPopView>
//
// Created by Abnerzj on 2017/8/12.
// Copyright © 2017年 Abnerzj. All rights reserved.
//
// This source code is licensed under the MIT-style license found in the
// LICENSE file in the root directory of this source tree.
//
#import <UIKit/UIKit.h>
/**
显示时动画弹框样式
*/
typedef
NS_ENUM
(
NSInteger
,
ZJAnimationPopStyle
)
{
ZJAnimationPopStyleNO
=
0
,
///< 无动画
ZJAnimationPopStyleScale
,
///< 缩放动画,先放大,后恢复至原大小
ZJAnimationPopStyleShakeFromTop
,
///< 从顶部掉下到中间晃动动画
ZJAnimationPopStyleShakeFromBottom
,
///< 从底部往上到中间晃动动画
ZJAnimationPopStyleShakeFromLeft
,
///< 从左侧往右到中间晃动动画
ZJAnimationPopStyleShakeFromRight
,
///< 从右侧往左到中间晃动动画
ZJAnimationPopStyleCardDropFromLeft
,
///< 卡片从顶部左侧开始掉落动画
ZJAnimationPopStyleCardDropFromRight
,
///< 卡片从顶部右侧开始掉落动画
ZJAnimationPopStyleLineFromBottom
,
///< 平滑线性从底部推出来动画
};
/**
移除时动画弹框样式
*/
typedef
NS_ENUM
(
NSInteger
,
ZJAnimationDismissStyle
)
{
ZJAnimationDismissStyleNO
=
0
,
///< 无动画
ZJAnimationDismissStyleScale
,
///< 缩放动画
ZJAnimationDismissStyleDropToTop
,
///< 从中间直接掉落到顶部
ZJAnimationDismissStyleDropToBottom
,
///< 从中间直接掉落到底部
ZJAnimationDismissStyleDropToLeft
,
///< 从中间直接掉落到左侧
ZJAnimationDismissStyleDropToRight
,
///< 从中间直接掉落到右侧
ZJAnimationDismissStyleCardDropToLeft
,
///< 卡片从中间往左侧掉落
ZJAnimationDismissStyleCardDropToRight
,
///< 卡片从中间往右侧掉落
ZJAnimationDismissStyleCardDropToTop
,
///< 卡片从中间往顶部移动消失
ZJAnimationDismissStyleLineToBottom
,
///< 平滑线性掉落到底部动画
};
@interface
ZJAnimationPopView
:
UIView
/** 显示时点击背景是否移除弹框,默认为NO。 */
@property
(
nonatomic
)
BOOL
isClickBGDismiss
;
/** 显示时是否监听屏幕旋转,默认为NO */
@property
(
nonatomic
)
BOOL
isObserverOrientationChange
;
/** 显示时背景的透明度,取值(0.0~1.0),默认为0.5 */
@property
(
nonatomic
)
CGFloat
popBGAlpha
;
/** fatherview */
@property
(
nonatomic
,
weak
)
UIView
*
fatherView
;
/// 动画相关属性参数
/** 显示时动画时长,>= 0。不设置则使用默认的动画时长 */
@property
(
nonatomic
)
CGFloat
popAnimationDuration
;
/** 隐藏时动画时长,>= 0。不设置则使用默认的动画时长 */
@property
(
nonatomic
)
CGFloat
dismissAnimationDuration
;
/** 显示完成回调 */
@property
(
nullable
,
nonatomic
,
copy
)
void
(
^
popComplete
)(
void
);
/** 移除完成回调 */
@property
(
nullable
,
nonatomic
,
copy
)
void
(
^
dismissComplete
)(
void
);
/**
通过自定义视图来构造弹框视图
@param customView 自定义视图
*/
-
(
nullable
instancetype
)
initWithCustomView
:(
UIView
*
_Nonnull
)
customView
popStyle
:(
ZJAnimationPopStyle
)
popStyle
dismissStyle
:(
ZJAnimationDismissStyle
)
dismissStyle
;
/**
显示弹框
*/
-
(
void
)
pop
;
/**
移除弹框
*/
-
(
void
)
dismiss
;
@end
ColorfulSchool/ColorfulSchool/Classes/Vendor(三方)/ZJAnimationPopView/ZJAnimationPopView.m
0 → 100755
View file @
c32cb351
//
//
// ZJAnimationPopView.m
// ZJAnimationPopView <https://github.com/Abnerzj/ZJAnimationPopView>
//
// Created by Abnerzj on 2017/8/12.
// Copyright © 2017年 Abnerzj. All rights reserved.
//
// This source code is licensed under the MIT-style license found in the
// LICENSE file in the root directory of this source tree.
//
#import "ZJAnimationPopView.h"
// 角度转弧度
#define DEGREES_TO_RADIANS(angle) ((angle) / 180.0 * M_PI)
@interface
ZJAnimationPopView
()
<
UIGestureRecognizerDelegate
>
/** 内容视图 */
@property
(
nonatomic
,
strong
)
UIView
*
contentView
;
/** 背景层 */
@property
(
nonatomic
,
strong
)
UIView
*
backgroundView
;
/** 自定义视图 */
@property
(
nonatomic
,
strong
)
UIView
*
customView
;
/** 显示时动画弹框样式 */
@property
(
nonatomic
)
ZJAnimationPopStyle
animationPopStyle
;
/** 移除时动画弹框样式 */
@property
(
nonatomic
)
ZJAnimationDismissStyle
animationDismissStyle
;
/** 显示时背景是否透明,透明度是否为<= 0,默认为NO */
@property
(
nonatomic
)
BOOL
isTransparent
;
@end
@implementation
ZJAnimationPopView
-
(
nullable
instancetype
)
initWithCustomView
:(
UIView
*
_Nonnull
)
customView
popStyle
:(
ZJAnimationPopStyle
)
popStyle
dismissStyle
:(
ZJAnimationDismissStyle
)
dismissStyle
{
// 检测自定义视图是否存在(check customView is exist)
if
(
!
customView
)
{
return
nil
;
}
self
=
[
super
init
];
if
(
self
)
{
_isClickBGDismiss
=
NO
;
_isObserverOrientationChange
=
NO
;
_popBGAlpha
=
0
.
5
f
;
_isTransparent
=
NO
;
_customView
=
customView
;
_animationPopStyle
=
popStyle
;
_animationDismissStyle
=
dismissStyle
;
_popAnimationDuration
=
-
0
.
1
f
;
_dismissAnimationDuration
=
-
0
.
1
f
;
self
.
backgroundColor
=
[
UIColor
clearColor
];
self
.
frame
=
CGRectMake
(
0
,
0
,
[[
UIScreen
mainScreen
]
bounds
].
size
.
width
,
[[
UIScreen
mainScreen
]
bounds
].
size
.
height
);
_backgroundView
=
[[
UIView
alloc
]
initWithFrame
:
self
.
bounds
];
_backgroundView
.
backgroundColor
=
[
UIColor
blackColor
];
_backgroundView
.
alpha
=
0
.
0
f
;
[
self
addSubview
:
_backgroundView
];
_contentView
=
[[
UIView
alloc
]
initWithFrame
:
self
.
bounds
];
_contentView
.
backgroundColor
=
[
UIColor
clearColor
];
[
self
addSubview
:
_contentView
];
UITapGestureRecognizer
*
tap
=
[[
UITapGestureRecognizer
alloc
]
initWithTarget
:
self
action
:
@selector
(
tapBGLayer
:
)];
tap
.
delegate
=
self
;
[
_contentView
addGestureRecognizer
:
tap
];
customView
.
center
=
_contentView
.
center
;
[
_contentView
addSubview
:
customView
];
}
return
self
;
}
-
(
void
)
setIsObserverOrientationChange
:(
BOOL
)
isObserverOrientationChange
{
_isObserverOrientationChange
=
isObserverOrientationChange
;
if
(
_isObserverOrientationChange
)
{
[[
NSNotificationCenter
defaultCenter
]
addObserver
:
self
selector
:
@selector
(
statusBarOrientationChange
:
)
name
:
UIApplicationDidChangeStatusBarOrientationNotification
object
:
nil
];
}
}
-
(
void
)
setPopBGAlpha
:(
CGFloat
)
popBGAlpha
{
_popBGAlpha
=
(
popBGAlpha
<=
0
.
0
f
)
?
0
.
0
f
:
((
popBGAlpha
>
1
.
0
)
?
1
.
0
:
popBGAlpha
);
_isTransparent
=
(
_popBGAlpha
==
0
.
0
f
);
}
#pragma mark 点击背景(Click background)
-
(
void
)
tapBGLayer
:(
UITapGestureRecognizer
*
)
tap
{
if
(
_isClickBGDismiss
)
{
[
self
dismiss
];
}
}
#pragma mark UIGestureRecognizer Delegate
-
(
BOOL
)
gestureRecognizer
:(
UIGestureRecognizer
*
)
gestureRecognizer
shouldReceiveTouch
:(
UITouch
*
)
touch
{
CGPoint
location
=
[
touch
locationInView
:
_contentView
];
location
=
[
_customView
.
layer
convertPoint
:
location
fromLayer
:
_contentView
.
layer
];
return
!
[
_customView
.
layer
containsPoint
:
location
];
}
-
(
void
)
pop
{
if
(
self
.
fatherView
)
{
[
self
.
fatherView
addSubview
:
self
];
}
else
{
[[
UIApplication
sharedApplication
].
keyWindow
addSubview
:
self
];
}
__weak
typeof
(
self
)
ws
=
self
;
NSTimeInterval
defaultDuration
=
[
self
getPopDefaultDuration
:
self
.
animationPopStyle
];
NSTimeInterval
duration
=
(
_popAnimationDuration
<
0
.
0
f
)
?
defaultDuration
:
_popAnimationDuration
;
if
(
self
.
animationPopStyle
==
ZJAnimationPopStyleNO
)
{
self
.
alpha
=
0
.
0
;
if
(
self
.
isTransparent
)
{
self
.
backgroundView
.
backgroundColor
=
[
UIColor
clearColor
];
}
else
{
self
.
backgroundView
.
alpha
=
0
.
0
;
}
[
UIView
animateWithDuration
:
duration
animations
:
^
{
ws
.
alpha
=
1
.
0
;
if
(
!
ws
.
isTransparent
)
{
ws
.
backgroundView
.
alpha
=
ws
.
popBGAlpha
;
}
}];
}
else
{
if
(
ws
.
isTransparent
)
{
self
.
backgroundView
.
backgroundColor
=
[
UIColor
clearColor
];
}
else
{
self
.
backgroundView
.
alpha
=
0
.
0
;
[
UIView
animateWithDuration
:
duration
*
0
.
5
animations
:
^
{
ws
.
backgroundView
.
alpha
=
ws
.
popBGAlpha
;
}];
}
[
self
hanlePopAnimationWithDuration
:
duration
];
}
dispatch_after
(
dispatch_time
(
DISPATCH_TIME_NOW
,
(
int64_t
)(
duration
*
NSEC_PER_SEC
)),
dispatch_get_main_queue
(),
^
{
if
(
ws
.
popComplete
)
{
ws
.
popComplete
();
}
});
}
-
(
void
)
dismiss
{
__weak
typeof
(
self
)
ws
=
self
;
NSTimeInterval
defaultDuration
=
[
self
getDismissDefaultDuration
:
self
.
animationDismissStyle
];
NSTimeInterval
duration
=
(
_dismissAnimationDuration
<
0
.
0
f
)
?
defaultDuration
:
_dismissAnimationDuration
;
if
(
self
.
animationDismissStyle
==
ZJAnimationPopStyleNO
)
{
[
UIView
animateWithDuration
:
duration
animations
:
^
{
ws
.
alpha
=
0
.
0
;
ws
.
backgroundView
.
alpha
=
0
.
0
;
}];
}
else
{
if
(
!
ws
.
isTransparent
)
{
[
UIView
animateWithDuration
:
duration
*
0
.
5
animations
:
^
{
ws
.
backgroundView
.
alpha
=
0
.
0
;
}];
}
[
self
hanleDismissAnimationWithDuration
:
duration
];
}
if
(
ws
.
isObserverOrientationChange
)
{
[[
NSNotificationCenter
defaultCenter
]
removeObserver
:
self
name
:
UIApplicationDidChangeStatusBarOrientationNotification
object
:
nil
];
}
dispatch_after
(
dispatch_time
(
DISPATCH_TIME_NOW
,
(
int64_t
)(
duration
*
NSEC_PER_SEC
)),
dispatch_get_main_queue
(),
^
{
if
(
ws
.
dismissComplete
)
{
ws
.
dismissComplete
();
}
[
ws
removeFromSuperview
];
});
// Immediately respond to other places with animated dismiss
self
.
frame
=
CGRectZero
;
}
-
(
void
)
hanlePopAnimationWithDuration
:
(
NSTimeInterval
)
duration
{
__weak
typeof
(
self
)
ws
=
self
;
switch
(
self
.
animationPopStyle
)
{
case
ZJAnimationPopStyleScale
:
{
[
self
animationWithLayer
:
self
.
contentView
.
layer
duration
:
duration
values
:
@[
@0.0
,
@1.2
,
@1.0
]];
// 另外一组动画值(the other animation values) @[@0.0, @1.2, @0.9, @1.0]
}
break
;
case
ZJAnimationPopStyleShakeFromTop
:
case
ZJAnimationPopStyleShakeFromBottom
:
case
ZJAnimationPopStyleShakeFromLeft
:
case
ZJAnimationPopStyleShakeFromRight
:
{
CGPoint
startPosition
=
self
.
contentView
.
layer
.
position
;
if
(
self
.
animationPopStyle
==
ZJAnimationPopStyleShakeFromTop
)
{
self
.
contentView
.
layer
.
position
=
CGPointMake
(
startPosition
.
x
,
-
startPosition
.
y
);
}
else
if
(
self
.
animationPopStyle
==
ZJAnimationPopStyleShakeFromBottom
)
{
self
.
contentView
.
layer
.
position
=
CGPointMake
(
startPosition
.
x
,
CGRectGetMaxY
(
self
.
frame
)
+
startPosition
.
y
);
}
else
if
(
self
.
animationPopStyle
==
ZJAnimationPopStyleShakeFromLeft
)
{
self
.
contentView
.
layer
.
position
=
CGPointMake
(
-
startPosition
.
x
,
startPosition
.
y
);
}
else
{
self
.
contentView
.
layer
.
position
=
CGPointMake
(
CGRectGetMaxX
(
self
.
frame
)
+
startPosition
.
x
,
startPosition
.
y
);
}
[
UIView
animateWithDuration
:
duration
delay
:
0
usingSpringWithDamping
:
0
.
6
initialSpringVelocity
:
1
.
0
options
:
UIViewAnimationOptionCurveEaseIn
animations
:^
{
ws
.
contentView
.
layer
.
position
=
startPosition
;
}
completion
:
nil
];
}
break
;
case
ZJAnimationPopStyleCardDropFromLeft
:
case
ZJAnimationPopStyleCardDropFromRight
:
{
CGPoint
startPosition
=
self
.
contentView
.
layer
.
position
;
if
(
self
.
animationPopStyle
==
ZJAnimationPopStyleCardDropFromLeft
)
{
self
.
contentView
.
layer
.
position
=
CGPointMake
(
startPosition
.
x
*
1
.
0
,
-
startPosition
.
y
);
self
.
contentView
.
transform
=
CGAffineTransformMakeRotation
(
DEGREES_TO_RADIANS
(
15
.
0
));
}
else
{
self
.
contentView
.
layer
.
position
=
CGPointMake
(
startPosition
.
x
*
1
.
0
,
-
startPosition
.
y
);
self
.
contentView
.
transform
=
CGAffineTransformMakeRotation
(
DEGREES_TO_RADIANS
(
-
15
.
0
));
}
[
UIView
animateWithDuration
:
duration
delay
:
0
usingSpringWithDamping
:
0
.
75
initialSpringVelocity
:
1
.
0
options
:
UIViewAnimationOptionCurveEaseIn
animations
:^
{
ws
.
contentView
.
layer
.
position
=
startPosition
;
}
completion
:
nil
];
[
UIView
animateWithDuration
:
duration
*
0
.
6
animations
:
^
{
ws
.
contentView
.
layer
.
transform
=
CATransform3DMakeRotation
(
DEGREES_TO_RADIANS
((
ws
.
animationPopStyle
==
ZJAnimationPopStyleCardDropFromRight
)
?
5
.
5
:
-
5
.
5
),
0
,
0
,
0
);
}
completion
:^
(
BOOL
finished
)
{
[
UIView
animateWithDuration
:
duration
*
0
.
2
animations
:
^
{
ws
.
contentView
.
transform
=
CGAffineTransformMakeRotation
(
DEGREES_TO_RADIANS
((
ws
.
animationPopStyle
==
ZJAnimationPopStyleCardDropFromRight
)
?
-
1
.
0
:
1
.
0
));
}
completion
:^
(
BOOL
finished
)
{
[
UIView
animateWithDuration
:
duration
*
0
.
2
animations
:
^
{
ws
.
contentView
.
transform
=
CGAffineTransformMakeRotation
(
0
.
0
);
}
completion
:
nil
];
}];
}];
}
break
;
case
ZJAnimationPopStyleLineFromBottom
:
{
CGPoint
startPosition
=
self
.
contentView
.
layer
.
position
;
CGFloat
customViewY
=
CGRectGetMaxY
(
self
.
frame
)
-
self
.
customView
.
frame
.
size
.
height
;
CGFloat
customViewCenterY
=
customViewY
+
self
.
customView
.
frame
.
size
.
height
*
0
.
5
;
CGPoint
endPosition
=
CGPointMake
(
startPosition
.
x
,
customViewCenterY
);
self
.
contentView
.
layer
.
position
=
CGPointMake
(
startPosition
.
x
,
CGRectGetMaxY
(
self
.
frame
)
+
startPosition
.
y
);
[
UIView
animateWithDuration
:
duration
animations
:
^
{
ws
.
contentView
.
layer
.
position
=
endPosition
;
}];
}
break
;
default
:
break
;
}
}
-
(
void
)
hanleDismissAnimationWithDuration
:
(
NSTimeInterval
)
duration
{
__weak
typeof
(
self
)
ws
=
self
;
switch
(
self
.
animationDismissStyle
)
{
case
ZJAnimationDismissStyleScale
:
{
[
self
animationWithLayer
:
self
.
contentView
.
layer
duration
:
duration
values
:
@[
@1.0
,
@0.66
,
@0.33
,
@0.01
]];
}
break
;
case
ZJAnimationDismissStyleDropToTop
:
case
ZJAnimationDismissStyleDropToBottom
:
case
ZJAnimationDismissStyleDropToLeft
:
case
ZJAnimationDismissStyleDropToRight
:
{
CGPoint
startPosition
=
self
.
contentView
.
layer
.
position
;
CGPoint
endPosition
=
self
.
contentView
.
layer
.
position
;
if
(
self
.
animationDismissStyle
==
ZJAnimationDismissStyleDropToTop
)
{
endPosition
=
CGPointMake
(
startPosition
.
x
,
-
startPosition
.
y
);
}
else
if
(
self
.
animationDismissStyle
==
ZJAnimationDismissStyleDropToBottom
)
{
endPosition
=
CGPointMake
(
startPosition
.
x
,
CGRectGetMaxY
(
self
.
frame
)
+
startPosition
.
y
);
}
else
if
(
self
.
animationDismissStyle
==
ZJAnimationDismissStyleDropToLeft
)
{
endPosition
=
CGPointMake
(
-
startPosition
.
x
,
startPosition
.
y
);
}
else
{
endPosition
=
CGPointMake
(
CGRectGetMaxX
(
self
.
frame
)
+
startPosition
.
x
,
startPosition
.
y
);
}
[
UIView
animateWithDuration
:
duration
delay
:
0
usingSpringWithDamping
:
0
.
5
initialSpringVelocity
:
1
.
0
options
:
UIViewAnimationOptionCurveEaseIn
animations
:^
{
ws
.
contentView
.
layer
.
position
=
endPosition
;
}
completion
:
nil
];
}
break
;
case
ZJAnimationDismissStyleCardDropToLeft
:
case
ZJAnimationDismissStyleCardDropToRight
:
{
CGPoint
startPosition
=
self
.
contentView
.
layer
.
position
;
BOOL
isLandscape
=
UIInterfaceOrientationIsLandscape
([
UIApplication
sharedApplication
].
statusBarOrientation
);
__block
CGFloat
rotateEndY
=
0
.
0
f
;
[
UIView
animateWithDuration
:
duration
delay
:
0
usingSpringWithDamping
:
0
.
5
initialSpringVelocity
:
1
.
0
options
:
UIViewAnimationOptionCurveEaseIn
animations
:^
{
if
(
self
.
animationDismissStyle
==
ZJAnimationDismissStyleCardDropToLeft
)
{
ws
.
contentView
.
transform
=
CGAffineTransformMakeRotation
(
M_1_PI
*
0
.
75
);
if
(
isLandscape
)
rotateEndY
=
fabs
(
ws
.
contentView
.
frame
.
origin
.
y
);
ws
.
contentView
.
layer
.
position
=
CGPointMake
(
startPosition
.
x
,
CGRectGetMaxY
(
ws
.
frame
)
+
startPosition
.
y
+
rotateEndY
);
}
else
{
ws
.
contentView
.
transform
=
CGAffineTransformMakeRotation
(
-
M_1_PI
*
0
.
75
);
if
(
isLandscape
)
rotateEndY
=
fabs
(
ws
.
contentView
.
frame
.
origin
.
y
);
ws
.
contentView
.
layer
.
position
=
CGPointMake
(
startPosition
.
x
*
1
.
25
,
CGRectGetMaxY
(
ws
.
frame
)
+
startPosition
.
y
+
rotateEndY
);
}
}
completion
:
nil
];
}
break
;
case
ZJAnimationDismissStyleCardDropToTop
:
{
CGPoint
startPosition
=
self
.
contentView
.
layer
.
position
;
CGPoint
endPosition
=
CGPointMake
(
startPosition
.
x
,
-
startPosition
.
y
);
[
UIView
animateWithDuration
:
duration
*
0
.
2
animations
:
^
{
ws
.
contentView
.
layer
.
position
=
CGPointMake
(
startPosition
.
x
,
startPosition
.
y
+
50
.
0
f
);
}
completion
:^
(
BOOL
finished
)
{
[
UIView
animateWithDuration
:
duration
*
0
.
8
animations
:
^
{
ws
.
contentView
.
layer
.
position
=
endPosition
;
}
completion
:
nil
];
}];
}
break
;
case
ZJAnimationDismissStyleLineToBottom
:
{
CGPoint
startPosition
=
self
.
contentView
.
layer
.
position
;
CGPoint
endPosition
=
CGPointMake
(
startPosition
.
x
,
CGRectGetMaxY
(
self
.
frame
)
+
startPosition
.
y
);
[
UIView
animateWithDuration
:
duration
animations
:
^
{
ws
.
contentView
.
layer
.
position
=
endPosition
;
}];
}
break
;
default
:
break
;
}
}
-
(
NSTimeInterval
)
getPopDefaultDuration
:
(
ZJAnimationPopStyle
)
animationPopStyle
{
NSTimeInterval
defaultDuration
=
0
.
0
f
;
if
(
animationPopStyle
==
ZJAnimationPopStyleNO
)
{
defaultDuration
=
0
.
2
f
;
}
else
if
(
animationPopStyle
==
ZJAnimationPopStyleScale
||
animationPopStyle
==
ZJAnimationPopStyleLineFromBottom
)
{
defaultDuration
=
0
.
3
f
;
}
else
if
(
animationPopStyle
==
ZJAnimationPopStyleShakeFromTop
||
animationPopStyle
==
ZJAnimationPopStyleShakeFromBottom
||
animationPopStyle
==
ZJAnimationPopStyleShakeFromLeft
||
animationPopStyle
==
ZJAnimationPopStyleShakeFromRight
||
animationPopStyle
==
ZJAnimationPopStyleCardDropFromLeft
||
animationPopStyle
==
ZJAnimationPopStyleCardDropFromRight
)
{
defaultDuration
=
0
.
8
f
;
}
return
defaultDuration
;
}
-
(
NSTimeInterval
)
getDismissDefaultDuration
:
(
ZJAnimationDismissStyle
)
animationDismissStyle
{
NSTimeInterval
defaultDuration
=
0
.
0
f
;
if
(
animationDismissStyle
==
ZJAnimationDismissStyleNO
||
animationDismissStyle
==
ZJAnimationDismissStyleScale
)
{
defaultDuration
=
0
.
2
f
;
}
else
if
(
animationDismissStyle
==
ZJAnimationDismissStyleLineToBottom
)
{
defaultDuration
=
0
.
3
f
;
}
else
if
(
animationDismissStyle
==
ZJAnimationDismissStyleDropToTop
||
animationDismissStyle
==
ZJAnimationDismissStyleDropToBottom
||
animationDismissStyle
==
ZJAnimationDismissStyleDropToLeft
||
animationDismissStyle
==
ZJAnimationDismissStyleDropToRight
||
animationDismissStyle
==
ZJAnimationDismissStyleCardDropToLeft
||
animationDismissStyle
==
ZJAnimationDismissStyleCardDropToRight
||
animationDismissStyle
==
ZJAnimationDismissStyleCardDropToTop
)
{
defaultDuration
=
0
.
8
f
;
}
return
defaultDuration
;
}
-
(
void
)
animationWithLayer
:
(
CALayer
*
)
layer
duration
:
(
CGFloat
)
duration
values
:
(
NSArray
*
)
values
{
CAKeyframeAnimation
*
KFAnimation
=
[
CAKeyframeAnimation
animationWithKeyPath
:
@"transform"
];
KFAnimation
.
duration
=
duration
;
KFAnimation
.
removedOnCompletion
=
NO
;
KFAnimation
.
fillMode
=
kCAFillModeForwards
;
NSMutableArray
*
valueArr
=
[
NSMutableArray
arrayWithCapacity
:
values
.
count
];
for
(
NSUInteger
i
=
0
;
i
<
values
.
count
;
i
++
)
{
CGFloat
scaleValue
=
[
values
[
i
]
floatValue
];
[
valueArr
addObject
:[
NSValue
valueWithCATransform3D
:
CATransform3DMakeScale
(
scaleValue
,
scaleValue
,
scaleValue
)]];
}
KFAnimation
.
values
=
valueArr
;
KFAnimation
.
timingFunction
=
[
CAMediaTimingFunction
functionWithName
:
kCAMediaTimingFunctionEaseIn
];
[
layer
addAnimation
:
KFAnimation
forKey
:
nil
];
}
#pragma mark 监听横竖屏方向改变
-
(
void
)
statusBarOrientationChange
:
(
NSNotification
*
)
notification
{
CGRect
startCustomViewRect
=
self
.
customView
.
frame
;
self
.
frame
=
CGRectMake
(
0
,
0
,
[[
UIScreen
mainScreen
]
bounds
].
size
.
width
,
[[
UIScreen
mainScreen
]
bounds
].
size
.
height
);
self
.
backgroundView
.
frame
=
self
.
bounds
;
self
.
contentView
.
frame
=
self
.
bounds
;
self
.
customView
.
frame
=
startCustomViewRect
;
self
.
customView
.
center
=
self
.
center
;
}
@end
ColorfulSchool/ColorfulSchool/PrefixHeader.pch
View file @
c32cb351
...
...
@@ -52,35 +52,13 @@
#import <MJExtension.h>
#import "ZXCustomAdView.h"
#import "ZXScannerViewController.h"
#import "ZXPopAnimationTool.h"
#define APPversion [[NSBundle mainBundle] infoDictionary][@"CFBundleShortVersionString"]
#define kWidth [UIScreen mainScreen].bounds.size.width //屏幕宽度
#define kHeight [UIScreen mainScreen].bounds.size.height//屏幕高度
#define uploadeUrlStr [NSString stringWithFormat:@""]//上传地址
//#define requestUrlStr [NSString stringWithFormat:@"http://api.dcrym.com/dcintsrv/mt/entrance.do"]//发布地址
//#define requestAliUrlStr [NSString stringWithFormat:@"http://api.dcrym.com/dcintsrv/pay/createAliOrder.do"]//支付宝发布接口地址
//#define requestWeiXinUrlStr [NSString stringWithFormat:@"http://api.dcrym.com/dcintsrv/pay/createWxOrder.do"]//微信接发布口地址
//#define requestUrlStr [NSString stringWithFormat:@"http://test.pxkjcn.com/dcintsrv/mt/entrance.do"]//外网测试地址
//#define requestAliUrlStr [NSString stringWithFormat:@"http://test.pxkjcn.com/dcintsrv/pay/createAliOrder.do"]//支付宝接口地址
//#define requestWeiXinUrlStr [NSString stringWithFormat:@"http://test.pxkjcn.com/dcintsrv/pay/createWxOrder.do"]//微信接口地址
//#define SqurerequestUrlStr [NSString stringWithFormat:@"http://192.168.1.193:8089/dclatintsrv/mt/entrance.do"]//格子蒋
//#define SqureImageUploadUrlStr [NSString stringWithFormat:@"http://192.168.1.193:8089/dclatintsrv/hardware/fileUpload.do"]//格子上传图片将
////数据测试
//#define requestUrlStr [NSString stringWithFormat:@"http://test.dcrym.com:8090/dcintsrv_drds/mt/entrance.do"]//外网测试地址
//#define requestAliUrlStr [NSString stringWithFormat:@"http://test.dcrym.com:8090/dcintsrv_drds/pay/createAliOrder.do"]//支付宝接口地址
//#define requestWeiXinUrlStr [NSString stringWithFormat:@"http://test.dcrym.com:8090/dcintsrv_drds/pay/createWxOrder.do"]//微信接口地址
//#define requestUrlStr [NSString stringWithFormat:@"%@/dcintsrv/mt/entrance.do",[[NSUserDefaults standardUserDefaults] objectForKey:@"schoolIp"]]//外网测试地址
//#define requestAliUrlStr [NSString stringWithFormat:@"%@/dcintsrv/pay/createAliOrder.do",[[NSUserDefaults standardUserDefaults] objectForKey:@"schoolIp"]]//支付宝接口地址
//#define requestWeiXinUrlStr [NSString stringWithFormat:@"%@/dcintsrv/pay/createWxOrder.do",[[NSUserDefaults standardUserDefaults] objectForKey:@"schoolIp"]]//微信接口地址
////
//#define SqurerequestUrlStr [NSString stringWithFormat:@"%@/dclatintsrv/mt/entrance.do",[[NSUserDefaults standardUserDefaults] objectForKey:@"squreIp"]]
//#define SqureImageUploadUrlStr [NSString stringWithFormat:@"%@/dclatintsrv/hardware/fileUpload.do",[[NSUserDefaults standardUserDefaults] objectForKey:@"squreIp"]]//格子上传图片将
#define requestUrlStr [NSString stringWithFormat:@"%@",[[NSUserDefaults standardUserDefaults] objectForKey:@"schoolIp"]]//外网测试地址
#define requestAliUrlStr [NSString stringWithFormat:@"%@",[[NSUserDefaults standardUserDefaults] objectForKey:@"Ali"]]//支付宝接口地址
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment