Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Sign in / Register
Toggle navigation
D
Dolphins
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Packages
Packages
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
lmj
Dolphins
Commits
eab230f5
Commit
eab230f5
authored
Jul 31, 2020
by
lmj_521aiau@163.com
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'master' into lmj_branch
# Conflicts: # .DS_Store
parents
6c512d18
3e133224
Show whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
48 additions
and
13 deletions
+48
-13
UserInterfaceState.xcuserstate
...a/zhangguangyi.xcuserdatad/UserInterfaceState.xcuserstate
+0
-0
ZJChooseIconController.m
...hins/Classes/Reminder/Controller/ZJChooseIconController.m
+2
-1
ZJReminderCateAddController.m
...Classes/Reminder/Controller/ZJReminderCateAddController.m
+3
-0
ZJReminderMainController.m
...ns/Classes/Reminder/Controller/ZJReminderMainController.m
+28
-7
ZJChooseIconCell.xib
Dolphins/Classes/Reminder/View/ZJChooseIconCell.xib
+5
-5
BasicMacro.h
Dolphins/Classes/Tools/BasicMacro.h
+10
-0
No files found.
Dolphins.xcworkspace/xcuserdata/zhangguangyi.xcuserdatad/UserInterfaceState.xcuserstate
View file @
eab230f5
No preview for this file type
Dolphins/Classes/Reminder/Controller/ZJChooseIconController.m
View file @
eab230f5
...
...
@@ -90,9 +90,10 @@
{
if
(
!
_collectionView
)
{
UICollectionViewFlowLayout
*
layout
=
[[
UICollectionViewFlowLayout
alloc
]
init
];
layout
.
itemSize
=
CGSizeMake
(
SCREEN_WIDTH
/
4
,
6
0
);
layout
.
itemSize
=
CGSizeMake
(
SCREEN_WIDTH
/
4
,
7
0
);
layout
.
minimumLineSpacing
=
0
;
layout
.
minimumInteritemSpacing
=
0
;
layout
.
sectionInset
=
UIEdgeInsetsMake
(
10
,
0
,
0
,
0
);
_collectionView
=
[[
UICollectionView
alloc
]
initWithFrame
:
self
.
view
.
bounds
collectionViewLayout
:
layout
];
_collectionView
.
delegate
=
self
;
_collectionView
.
dataSource
=
self
;
...
...
Dolphins/Classes/Reminder/Controller/ZJReminderCateAddController.m
View file @
eab230f5
...
...
@@ -73,6 +73,9 @@ static NSString * const ZJReminderFooterViewID = @"ZJReminderFooterViewID";
if
(
i
==
1
)
{
model
.
iconUrl
=
self
.
model
.
iconUrl
;
}
if
(
i
==
2
)
{
model
.
subName
=
self
.
model
.
name
;
}
[
self
.
dataArray
addObject
:
model
];
}
...
...
Dolphins/Classes/Reminder/Controller/ZJReminderMainController.m
View file @
eab230f5
...
...
@@ -21,6 +21,7 @@ static NSString *ZJReminderMainCellID = @"ZJReminderMainCellID";
@property
(
nonatomic
,
strong
)
ZJReminderBottom
*
bottomView
;
@property
(
nonatomic
,
strong
)
NSMutableArray
*
dataArray
;
@property
(
nonatomic
,
assign
)
BOOL
isManger
;
@property
(
nonatomic
,
strong
)
UIBarButtonItem
*
mangerButtonItem
;
@end
...
...
@@ -49,7 +50,9 @@ static NSString *ZJReminderMainCellID = @"ZJReminderMainCellID";
if
(
self
.
model
)
{
self
.
title
=
self
.
model
.
name
;
}
self
.
navigationItem
.
rightBarButtonItem
=
[[
UIBarButtonItem
alloc
]
initWithTitle
:
@"管理"
style
:
UIBarButtonItemStyleDone
target
:
self
action
:
@selector
(
chooseAction
)];
self
.
mangerButtonItem
=
[[
UIBarButtonItem
alloc
]
initWithTitle
:
@"管理"
style
:
UIBarButtonItemStyleDone
target
:
self
action
:
@selector
(
chooseAction
)];
// self.navigationItem.rightBarButtonItem = [[UIBarButtonItem alloc] initWithTitle:@"" style:UIBarButtonItemStyleDone target:self action:@selector(chooseAction)];
self
.
navigationItem
.
rightBarButtonItem
.
tintColor
=
[
UIColor
blackColor
];
[
self
setupUI
];
...
...
@@ -73,10 +76,12 @@ static NSString *ZJReminderMainCellID = @"ZJReminderMainCellID";
self
.
bottomView
=
[[
ZJReminderBottom
alloc
]
init
];
[
self
.
view
addSubview
:
self
.
bottomView
];
CGFloat
bottomMargin
=
IPHONE_X
?
(
-
20
-
39
)
:
-
20
;
[
self
.
bottomView
mas_makeConstraints
:
^
(
MASConstraintMaker
*
make
)
{
make
.
left
.
mas_equalTo
(
20
);
make
.
right
.
mas_equalTo
(
-
20
);
make
.
bottom
.
mas_equalTo
(
-
20
);
make
.
bottom
.
mas_equalTo
(
bottomMargin
);
make
.
height
.
mas_equalTo
(
44
);
}];
...
...
@@ -87,7 +92,14 @@ static NSString *ZJReminderMainCellID = @"ZJReminderMainCellID";
if
(
weakSelf
.
isManger
)
{
NSLog
(
@"删除整个分类"
);
UIAlertController
*
alert
=
[
UIAlertController
alertControllerWithTitle
:
@"温馨提示"
message
:
@"删除后,好友将收不到此分类下的所有提醒通知,确定要删除吗?"
preferredStyle
:
UIAlertControllerStyleAlert
];
UIAlertAction
*
cancel
=
[
UIAlertAction
actionWithTitle
:
@"在想想"
style
:
UIAlertActionStyleCancel
handler
:
nil
];
UIAlertAction
*
delete
=
[
UIAlertAction
actionWithTitle
:
@"删除"
style
:
UIAlertActionStyleDestructive
handler
:^
(
UIAlertAction
*
_Nonnull
action
)
{
[
weakSelf
deleteCategory
];
}];
[
alert
addAction
:
cancel
];
[
alert
addAction
:
delete
];
[
weakSelf
presentViewController
:
alert
animated
:
YES
completion
:
nil
];
}
else
{
NSLog
(
@"添加提醒"
);
ZJReminderCateAddController
*
vc
=
[
ZJReminderCateAddController
new
];
...
...
@@ -110,6 +122,7 @@ static NSString *ZJReminderMainCellID = @"ZJReminderMainCellID";
}
failure
:^
(
NSError
*
_Nonnull
error
)
{
}];
// NSDictionary *dict = @{@"remindTypeId":@(self.model.id)};
// [[TQNetworkTools shared] postWithAction:reminderDeleteCategory parameters:dict success:^(id _Nonnull response) {
// if ([response[@"status"] intValue] == 200) {
...
...
@@ -124,12 +137,12 @@ static NSString *ZJReminderMainCellID = @"ZJReminderMainCellID";
-
(
void
)
chooseAction
{
NSString
*
name
=
self
.
navigationItem
.
rightBa
rButtonItem
.
title
;
NSString
*
name
=
self
.
mange
rButtonItem
.
title
;
if
([
name
isEqualToString
:
@"管理"
])
{
self
.
navigationItem
.
rightBa
rButtonItem
.
title
=
@"取消"
;
self
.
mange
rButtonItem
.
title
=
@"取消"
;
[
self
exchangeChooseState
:
YES
];
}
else
{
self
.
navigationItem
.
rightBa
rButtonItem
.
title
=
@"管理"
;
self
.
mange
rButtonItem
.
title
=
@"管理"
;
[
self
exchangeChooseState
:
NO
];
}
}
...
...
@@ -167,6 +180,14 @@ static NSString *ZJReminderMainCellID = @"ZJReminderMainCellID";
}
else
{
[
MBProgressHUD
showError
:[
NSString
stringWithFormat
:
@"%@"
,
response
[
@"msg"
]]
toView
:
self
.
view
];
}
if
(
self
.
dataArray
.
count
)
{
self
.
navigationItem
.
rightBarButtonItem
=
self
.
mangerButtonItem
;
}
else
{
self
.
navigationItem
.
rightBarButtonItem
=
nil
;
[
self
exchangeChooseState
:
NO
];
self
.
mangerButtonItem
.
title
=
@"管理"
;
}
[
self
.
tableView
reloadData
];
}
failure
:^
(
NSError
*
_Nonnull
error
)
{
...
...
@@ -200,7 +221,7 @@ static NSString *ZJReminderMainCellID = @"ZJReminderMainCellID";
ZJReminderMainCell
*
cell
=
(
ZJReminderMainCell
*
)
sender
.
superview
.
superview
;
NSIndexPath
*
indexPath
=
[
self
.
tableView
indexPathForCell
:
cell
];
ZJReminder
*
model
=
self
.
dataArray
[
indexPath
.
row
];
UIAlertController
*
alert
=
[
UIAlertController
alertControllerWithTitle
:
@"温馨提示"
message
:
@"删除后,好友将收不到此
分类下的所有
提醒通知,确定要删除吗?"
preferredStyle
:
UIAlertControllerStyleAlert
];
UIAlertController
*
alert
=
[
UIAlertController
alertControllerWithTitle
:
@"温馨提示"
message
:
@"删除后,好友将收不到此提醒通知,确定要删除吗?"
preferredStyle
:
UIAlertControllerStyleAlert
];
UIAlertAction
*
cancel
=
[
UIAlertAction
actionWithTitle
:
@"在想想"
style
:
UIAlertActionStyleCancel
handler
:
nil
];
UIAlertAction
*
delete
=
[
UIAlertAction
actionWithTitle
:
@"删除"
style
:
UIAlertActionStyleDestructive
handler
:^
(
UIAlertAction
*
_Nonnull
action
)
{
[
self
deleteReminder
:
model
];
...
...
Dolphins/Classes/Reminder/View/ZJChooseIconCell.xib
View file @
eab230f5
...
...
@@ -16,11 +16,11 @@
<rect
key=
"frame"
x=
"0.0"
y=
"0.0"
width=
"91"
height=
"108"
/>
<autoresizingMask
key=
"autoresizingMask"
flexibleMaxX=
"YES"
flexibleMaxY=
"YES"
/>
<subviews>
<imageView
clipsSubviews=
"YES"
userInteractionEnabled=
"NO"
contentMode=
"scaleAspectFi
t"
horizontalHuggingPriority=
"251"
verticalHuggingPriority=
"251"
image=
"remind_cell_0_2
"
translatesAutoresizingMaskIntoConstraints=
"NO"
id=
"nuB-Rn-VdK"
>
<rect
key=
"frame"
x=
"2
5.5"
y=
"34"
width=
"40"
height=
"40
"
/>
<imageView
clipsSubviews=
"YES"
userInteractionEnabled=
"NO"
contentMode=
"scaleAspectFi
ll"
horizontalHuggingPriority=
"251"
verticalHuggingPriority=
"251"
image=
"remind_cell_0_1
"
translatesAutoresizingMaskIntoConstraints=
"NO"
id=
"nuB-Rn-VdK"
>
<rect
key=
"frame"
x=
"2
3"
y=
"31.5"
width=
"45"
height=
"45
"
/>
<constraints>
<constraint
firstAttribute=
"width"
constant=
"4
0
"
id=
"9QJ-Za-gUs"
/>
<constraint
firstAttribute=
"height"
constant=
"4
0
"
id=
"Cvy-XH-9Ai"
/>
<constraint
firstAttribute=
"width"
constant=
"4
5
"
id=
"9QJ-Za-gUs"
/>
<constraint
firstAttribute=
"height"
constant=
"4
5
"
id=
"Cvy-XH-9Ai"
/>
</constraints>
</imageView>
</subviews>
...
...
@@ -37,6 +37,6 @@
</collectionViewCell>
</objects>
<resources>
<image
name=
"remind_cell_0_
2
"
width=
"40"
height=
"40"
/>
<image
name=
"remind_cell_0_
1
"
width=
"40"
height=
"40"
/>
</resources>
</document>
Dolphins/Classes/Tools/BasicMacro.h
View file @
eab230f5
...
...
@@ -133,4 +133,14 @@ _Pragma("clang diagnostic pop")\
#define iOS10_Or_GREATER SYSTEM_VERSION_GREATER_THAN_OR_EQUAL_TO(@"10.0")
#define iOS8_Or_GREATER SYSTEM_VERSION_GREATER_THAN_OR_EQUAL_TO(@"8.0")
#define iOS_Available(version) @available(iOS version, *)
#define IPHONE_X ({\
BOOL isBangsScreen = NO; \
if (@available(iOS 11.0, *)) { \
UIWindow *window = [[UIApplication sharedApplication].windows firstObject]; \
isBangsScreen = window.safeAreaInsets.bottom > 0; \
} \
isBangsScreen; \
})
#endif
/* BasicMacro_h */
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