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
3e133224
Commit
3e133224
authored
Jul 31, 2020
by
zhangguangyi
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
update
parent
58c5ce6e
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
48 additions
and
13 deletions
+48
-13
.DS_Store
.DS_Store
+0
-0
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.
.DS_Store
View file @
3e133224
No preview for this file type
Dolphins.xcworkspace/xcuserdata/zhangguangyi.xcuserdatad/UserInterfaceState.xcuserstate
View file @
3e133224
No preview for this file type
Dolphins/Classes/Reminder/Controller/ZJChooseIconController.m
View file @
3e133224
...
@@ -90,9 +90,10 @@
...
@@ -90,9 +90,10 @@
{
{
if
(
!
_collectionView
)
{
if
(
!
_collectionView
)
{
UICollectionViewFlowLayout
*
layout
=
[[
UICollectionViewFlowLayout
alloc
]
init
];
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
.
minimumLineSpacing
=
0
;
layout
.
minimumInteritemSpacing
=
0
;
layout
.
minimumInteritemSpacing
=
0
;
layout
.
sectionInset
=
UIEdgeInsetsMake
(
10
,
0
,
0
,
0
);
_collectionView
=
[[
UICollectionView
alloc
]
initWithFrame
:
self
.
view
.
bounds
collectionViewLayout
:
layout
];
_collectionView
=
[[
UICollectionView
alloc
]
initWithFrame
:
self
.
view
.
bounds
collectionViewLayout
:
layout
];
_collectionView
.
delegate
=
self
;
_collectionView
.
delegate
=
self
;
_collectionView
.
dataSource
=
self
;
_collectionView
.
dataSource
=
self
;
...
...
Dolphins/Classes/Reminder/Controller/ZJReminderCateAddController.m
View file @
3e133224
...
@@ -73,6 +73,9 @@ static NSString * const ZJReminderFooterViewID = @"ZJReminderFooterViewID";
...
@@ -73,6 +73,9 @@ static NSString * const ZJReminderFooterViewID = @"ZJReminderFooterViewID";
if
(
i
==
1
)
{
if
(
i
==
1
)
{
model
.
iconUrl
=
self
.
model
.
iconUrl
;
model
.
iconUrl
=
self
.
model
.
iconUrl
;
}
}
if
(
i
==
2
)
{
model
.
subName
=
self
.
model
.
name
;
}
[
self
.
dataArray
addObject
:
model
];
[
self
.
dataArray
addObject
:
model
];
}
}
...
...
Dolphins/Classes/Reminder/Controller/ZJReminderMainController.m
View file @
3e133224
...
@@ -21,6 +21,7 @@ static NSString *ZJReminderMainCellID = @"ZJReminderMainCellID";
...
@@ -21,6 +21,7 @@ static NSString *ZJReminderMainCellID = @"ZJReminderMainCellID";
@property
(
nonatomic
,
strong
)
ZJReminderBottom
*
bottomView
;
@property
(
nonatomic
,
strong
)
ZJReminderBottom
*
bottomView
;
@property
(
nonatomic
,
strong
)
NSMutableArray
*
dataArray
;
@property
(
nonatomic
,
strong
)
NSMutableArray
*
dataArray
;
@property
(
nonatomic
,
assign
)
BOOL
isManger
;
@property
(
nonatomic
,
assign
)
BOOL
isManger
;
@property
(
nonatomic
,
strong
)
UIBarButtonItem
*
mangerButtonItem
;
@end
@end
...
@@ -49,7 +50,9 @@ static NSString *ZJReminderMainCellID = @"ZJReminderMainCellID";
...
@@ -49,7 +50,9 @@ static NSString *ZJReminderMainCellID = @"ZJReminderMainCellID";
if
(
self
.
model
)
{
if
(
self
.
model
)
{
self
.
title
=
self
.
model
.
name
;
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
.
navigationItem
.
rightBarButtonItem
.
tintColor
=
[
UIColor
blackColor
];
[
self
setupUI
];
[
self
setupUI
];
...
@@ -73,10 +76,12 @@ static NSString *ZJReminderMainCellID = @"ZJReminderMainCellID";
...
@@ -73,10 +76,12 @@ static NSString *ZJReminderMainCellID = @"ZJReminderMainCellID";
self
.
bottomView
=
[[
ZJReminderBottom
alloc
]
init
];
self
.
bottomView
=
[[
ZJReminderBottom
alloc
]
init
];
[
self
.
view
addSubview
:
self
.
bottomView
];
[
self
.
view
addSubview
:
self
.
bottomView
];
CGFloat
bottomMargin
=
IPHONE_X
?
(
-
20
-
39
)
:
-
20
;
[
self
.
bottomView
mas_makeConstraints
:
^
(
MASConstraintMaker
*
make
)
{
[
self
.
bottomView
mas_makeConstraints
:
^
(
MASConstraintMaker
*
make
)
{
make
.
left
.
mas_equalTo
(
20
);
make
.
left
.
mas_equalTo
(
20
);
make
.
right
.
mas_equalTo
(
-
20
);
make
.
right
.
mas_equalTo
(
-
20
);
make
.
bottom
.
mas_equalTo
(
-
20
);
make
.
bottom
.
mas_equalTo
(
bottomMargin
);
make
.
height
.
mas_equalTo
(
44
);
make
.
height
.
mas_equalTo
(
44
);
}];
}];
...
@@ -87,7 +92,14 @@ static NSString *ZJReminderMainCellID = @"ZJReminderMainCellID";
...
@@ -87,7 +92,14 @@ static NSString *ZJReminderMainCellID = @"ZJReminderMainCellID";
if
(
weakSelf
.
isManger
)
{
if
(
weakSelf
.
isManger
)
{
NSLog
(
@"删除整个分类"
);
NSLog
(
@"删除整个分类"
);
[
weakSelf
deleteCategory
];
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
{
}
else
{
NSLog
(
@"添加提醒"
);
NSLog
(
@"添加提醒"
);
ZJReminderCateAddController
*
vc
=
[
ZJReminderCateAddController
new
];
ZJReminderCateAddController
*
vc
=
[
ZJReminderCateAddController
new
];
...
@@ -110,6 +122,7 @@ static NSString *ZJReminderMainCellID = @"ZJReminderMainCellID";
...
@@ -110,6 +122,7 @@ static NSString *ZJReminderMainCellID = @"ZJReminderMainCellID";
}
failure
:^
(
NSError
*
_Nonnull
error
)
{
}
failure
:^
(
NSError
*
_Nonnull
error
)
{
}];
}];
// NSDictionary *dict = @{@"remindTypeId":@(self.model.id)};
// NSDictionary *dict = @{@"remindTypeId":@(self.model.id)};
// [[TQNetworkTools shared] postWithAction:reminderDeleteCategory parameters:dict success:^(id _Nonnull response) {
// [[TQNetworkTools shared] postWithAction:reminderDeleteCategory parameters:dict success:^(id _Nonnull response) {
// if ([response[@"status"] intValue] == 200) {
// if ([response[@"status"] intValue] == 200) {
...
@@ -124,12 +137,12 @@ static NSString *ZJReminderMainCellID = @"ZJReminderMainCellID";
...
@@ -124,12 +137,12 @@ static NSString *ZJReminderMainCellID = @"ZJReminderMainCellID";
-
(
void
)
chooseAction
-
(
void
)
chooseAction
{
{
NSString
*
name
=
self
.
navigationItem
.
rightBa
rButtonItem
.
title
;
NSString
*
name
=
self
.
mange
rButtonItem
.
title
;
if
([
name
isEqualToString
:
@"管理"
])
{
if
([
name
isEqualToString
:
@"管理"
])
{
self
.
navigationItem
.
rightBa
rButtonItem
.
title
=
@"取消"
;
self
.
mange
rButtonItem
.
title
=
@"取消"
;
[
self
exchangeChooseState
:
YES
];
[
self
exchangeChooseState
:
YES
];
}
else
{
}
else
{
self
.
navigationItem
.
rightBa
rButtonItem
.
title
=
@"管理"
;
self
.
mange
rButtonItem
.
title
=
@"管理"
;
[
self
exchangeChooseState
:
NO
];
[
self
exchangeChooseState
:
NO
];
}
}
}
}
...
@@ -167,6 +180,14 @@ static NSString *ZJReminderMainCellID = @"ZJReminderMainCellID";
...
@@ -167,6 +180,14 @@ static NSString *ZJReminderMainCellID = @"ZJReminderMainCellID";
}
else
{
}
else
{
[
MBProgressHUD
showError
:[
NSString
stringWithFormat
:
@"%@"
,
response
[
@"msg"
]]
toView
:
self
.
view
];
[
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
];
[
self
.
tableView
reloadData
];
}
failure
:^
(
NSError
*
_Nonnull
error
)
{
}
failure
:^
(
NSError
*
_Nonnull
error
)
{
...
@@ -200,7 +221,7 @@ static NSString *ZJReminderMainCellID = @"ZJReminderMainCellID";
...
@@ -200,7 +221,7 @@ static NSString *ZJReminderMainCellID = @"ZJReminderMainCellID";
ZJReminderMainCell
*
cell
=
(
ZJReminderMainCell
*
)
sender
.
superview
.
superview
;
ZJReminderMainCell
*
cell
=
(
ZJReminderMainCell
*
)
sender
.
superview
.
superview
;
NSIndexPath
*
indexPath
=
[
self
.
tableView
indexPathForCell
:
cell
];
NSIndexPath
*
indexPath
=
[
self
.
tableView
indexPathForCell
:
cell
];
ZJReminder
*
model
=
self
.
dataArray
[
indexPath
.
row
];
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
*
cancel
=
[
UIAlertAction
actionWithTitle
:
@"在想想"
style
:
UIAlertActionStyleCancel
handler
:
nil
];
UIAlertAction
*
delete
=
[
UIAlertAction
actionWithTitle
:
@"删除"
style
:
UIAlertActionStyleDestructive
handler
:^
(
UIAlertAction
*
_Nonnull
action
)
{
UIAlertAction
*
delete
=
[
UIAlertAction
actionWithTitle
:
@"删除"
style
:
UIAlertActionStyleDestructive
handler
:^
(
UIAlertAction
*
_Nonnull
action
)
{
[
self
deleteReminder
:
model
];
[
self
deleteReminder
:
model
];
...
...
Dolphins/Classes/Reminder/View/ZJChooseIconCell.xib
View file @
3e133224
...
@@ -16,11 +16,11 @@
...
@@ -16,11 +16,11 @@
<rect
key=
"frame"
x=
"0.0"
y=
"0.0"
width=
"91"
height=
"108"
/>
<rect
key=
"frame"
x=
"0.0"
y=
"0.0"
width=
"91"
height=
"108"
/>
<autoresizingMask
key=
"autoresizingMask"
flexibleMaxX=
"YES"
flexibleMaxY=
"YES"
/>
<autoresizingMask
key=
"autoresizingMask"
flexibleMaxX=
"YES"
flexibleMaxY=
"YES"
/>
<subviews>
<subviews>
<imageView
clipsSubviews=
"YES"
userInteractionEnabled=
"NO"
contentMode=
"scaleAspectFi
t"
horizontalHuggingPriority=
"251"
verticalHuggingPriority=
"251"
image=
"remind_cell_0_2
"
translatesAutoresizingMaskIntoConstraints=
"NO"
id=
"nuB-Rn-VdK"
>
<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
5.5"
y=
"34"
width=
"40"
height=
"40
"
/>
<rect
key=
"frame"
x=
"2
3"
y=
"31.5"
width=
"45"
height=
"45
"
/>
<constraints>
<constraints>
<constraint
firstAttribute=
"width"
constant=
"4
0
"
id=
"9QJ-Za-gUs"
/>
<constraint
firstAttribute=
"width"
constant=
"4
5
"
id=
"9QJ-Za-gUs"
/>
<constraint
firstAttribute=
"height"
constant=
"4
0
"
id=
"Cvy-XH-9Ai"
/>
<constraint
firstAttribute=
"height"
constant=
"4
5
"
id=
"Cvy-XH-9Ai"
/>
</constraints>
</constraints>
</imageView>
</imageView>
</subviews>
</subviews>
...
@@ -37,6 +37,6 @@
...
@@ -37,6 +37,6 @@
</collectionViewCell>
</collectionViewCell>
</objects>
</objects>
<resources>
<resources>
<image
name=
"remind_cell_0_
2
"
width=
"40"
height=
"40"
/>
<image
name=
"remind_cell_0_
1
"
width=
"40"
height=
"40"
/>
</resources>
</resources>
</document>
</document>
Dolphins/Classes/Tools/BasicMacro.h
View file @
3e133224
...
@@ -133,4 +133,14 @@ _Pragma("clang diagnostic pop")\
...
@@ -133,4 +133,14 @@ _Pragma("clang diagnostic pop")\
#define iOS10_Or_GREATER SYSTEM_VERSION_GREATER_THAN_OR_EQUAL_TO(@"10.0")
#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 iOS8_Or_GREATER SYSTEM_VERSION_GREATER_THAN_OR_EQUAL_TO(@"8.0")
#define iOS_Available(version) @available(iOS version, *)
#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 */
#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