Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Sign in / Register
Toggle navigation
L
LuckFarm
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
LuckFarm
Commits
8b05af81
Commit
8b05af81
authored
Nov 20, 2020
by
zhangshuai
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
内容
parent
982d47cb
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
746 additions
and
0 deletions
+746
-0
WelfareCenterCell.h
...o/GYDemo/ViewController/Welfare/model/WelfareCenterCell.h
+25
-0
WelfareCenterCell.m
...o/GYDemo/ViewController/Welfare/model/WelfareCenterCell.m
+49
-0
WelfareCenterCell.xib
...GYDemo/ViewController/Welfare/model/WelfareCenterCell.xib
+108
-0
WelfareCenterVC.h
GYDemo/GYDemo/ViewController/Welfare/model/WelfareCenterVC.h
+16
-0
WelfareCenterVC.m
GYDemo/GYDemo/ViewController/Welfare/model/WelfareCenterVC.m
+352
-0
WelfareCenterVC.xib
...o/GYDemo/ViewController/Welfare/model/WelfareCenterVC.xib
+196
-0
No files found.
GYDemo/GYDemo/ViewController/Welfare/model/WelfareCenterCell.h
0 → 100644
View file @
8b05af81
//
// WelfareCenterCell.h
// GYDemo
//
// Created by zhangshuai on 2020/11/17.
//
#import <UIKit/UIKit.h>
NS_ASSUME_NONNULL_BEGIN
@interface
WelfareCenterCell
:
UITableViewCell
@property
(
weak
,
nonatomic
)
IBOutlet
UILabel
*
title
;
@property
(
weak
,
nonatomic
)
IBOutlet
UILabel
*
subTitle
;
@property
(
weak
,
nonatomic
)
IBOutlet
UIButton
*
awardNum
;
@property
(
weak
,
nonatomic
)
IBOutlet
UIButton
*
buttonState
;
-
(
IBAction
)
stateButtonClick
:(
UIButton
*
)
sender
;
@property
(
nonatomic
,
copy
)
void
(
^
buttonBlock
)(
WelfareCenterCell
*
thisCell
);
@property
(
nonatomic
,
assign
)
NSInteger
status
;
// 按钮状态
@end
NS_ASSUME_NONNULL_END
GYDemo/GYDemo/ViewController/Welfare/model/WelfareCenterCell.m
0 → 100644
View file @
8b05af81
//
// WelfareCenterCell.m
// GYDemo
//
// Created by zhangshuai on 2020/11/17.
//
#import "WelfareCenterCell.h"
@implementation
WelfareCenterCell
-
(
void
)
awakeFromNib
{
[
super
awakeFromNib
];
// Initialization code
}
-
(
void
)
setSelected
:
(
BOOL
)
selected
animated
:
(
BOOL
)
animated
{
[
super
setSelected
:
selected
animated
:
animated
];
// Configure the view for the selected state
}
-
(
void
)
setStatus
:
(
NSInteger
)
status
{
//0 : 去完成 1: 明日再来 2: 立即领取
_status
=
status
;
if
(
status
==
0
)
{
[
self
.
buttonState
setTitle
:
@"去完成"
forState
:
UIControlStateNormal
];
[
self
.
buttonState
setBackgroundImage
:[
UIImage
imageNamed
:
@"ToFinishRed"
]
forState
:
UIControlStateNormal
];
}
else
if
(
status
==
1
){
[
self
.
buttonState
setTitle
:
@"明日再来"
forState
:
UIControlStateNormal
];
[
self
.
buttonState
setBackgroundImage
:[
UIImage
imageNamed
:
@"CollectedGrey"
]
forState
:
UIControlStateNormal
];
}
else
if
(
status
==
2
){
[
self
.
buttonState
setTitle
:
@"立即领取"
forState
:
UIControlStateNormal
];
[
self
.
buttonState
setBackgroundImage
:[
UIImage
imageNamed
:
@"GetItNow"
]
forState
:
UIControlStateNormal
];
}
else
{
[
self
.
buttonState
setTitle
:
@"明日再来"
forState
:
UIControlStateNormal
];
[
self
.
buttonState
setBackgroundImage
:[
UIImage
imageNamed
:
@"CollectedGrey"
]
forState
:
UIControlStateNormal
];
}
}
-
(
IBAction
)
stateButtonClick
:
(
UIButton
*
)
sender
{
if
(
self
.
buttonBlock
)
{
self
.
buttonBlock
(
self
);
}
}
@end
GYDemo/GYDemo/ViewController/Welfare/model/WelfareCenterCell.xib
0 → 100644
View file @
8b05af81
This diff is collapsed.
Click to expand it.
GYDemo/GYDemo/ViewController/Welfare/model/WelfareCenterVC.h
0 → 100644
View file @
8b05af81
//
// WelfareCenterVC.h
// GYDemo
//
// Created by zhangshuai on 2020/11/17.
//
#import <UIKit/UIKit.h>
NS_ASSUME_NONNULL_BEGIN
@interface
WelfareCenterVC
:
BaseViewController
@end
NS_ASSUME_NONNULL_END
GYDemo/GYDemo/ViewController/Welfare/model/WelfareCenterVC.m
0 → 100644
View file @
8b05af81
This diff is collapsed.
Click to expand it.
GYDemo/GYDemo/ViewController/Welfare/model/WelfareCenterVC.xib
0 → 100644
View file @
8b05af81
This diff is collapsed.
Click to expand it.
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