FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

更新搜索 · JackCoderForLove/Coding-iOS@cec17f9 · GitHub

Commit cec17f9

Browse files
authored andcommitted
更新搜索
1 parent 9228368 commit cec17f9

10 files changed

Lines changed: 195 additions & 24 deletions

File tree

‎Coding_iOS.xcodeproj/project.pbxproj‎

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,8 @@
1515
099F63C81DEDBD0100072519 /* ActivenessModel.m in Sources */ = {isa = PBXBuildFile; fileRef = 099F63C71DEDBD0100072519 /* ActivenessModel.m */; };
1616
099F63CB1DEEFE0B00072519 /* UserActiveStatusView.m in Sources */ = {isa = PBXBuildFile; fileRef = 099F63CA1DEEFE0B00072519 /* UserActiveStatusView.m */; };
1717
09E337821DF4481400E1A601 /* TaskSelectionView.m in Sources */ = {isa = PBXBuildFile; fileRef = 09E337811DF4481400E1A601 /* TaskSelectionView.m */; };
18+
09E337851DF8361300E1A601 /* TaskSelectionCell.m in Sources */ = {isa = PBXBuildFile; fileRef = 09E337841DF8361300E1A601 /* TaskSelectionCell.m */; };
19+
09E337881DF83C7F00E1A601 /* ScreenView.m in Sources */ = {isa = PBXBuildFile; fileRef = 09E337871DF83C7F00E1A601 /* ScreenView.m */; };
1820
0A03E6D31ABD0F690034BB8E /* LocationHelper.m in Sources */ = {isa = PBXBuildFile; fileRef = 0A03E6D21ABD0F690034BB8E /* LocationHelper.m */; };
1921
0A0519E21ABA918100551B61 /* TweetSendDetailLoctionCell.m in Sources */ = {isa = PBXBuildFile; fileRef = 0A0519E01ABA918100551B61 /* TweetSendDetailLoctionCell.m */; };
2022
0A0519E31ABA918100551B61 /* TweetSendDetailLoctionCell.xib in Resources */ = {isa = PBXBuildFile; fileRef = 0A0519E11ABA918100551B61 /* TweetSendDetailLoctionCell.xib */; };
@@ -1212,6 +1214,10 @@
12121214
099F63CA1DEEFE0B00072519 /* UserActiveStatusView.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = UserActiveStatusView.m; sourceTree = "<group>"; };
12131215
09E337801DF4481400E1A601 /* TaskSelectionView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = TaskSelectionView.h; sourceTree = "<group>"; };
12141216
09E337811DF4481400E1A601 /* TaskSelectionView.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = TaskSelectionView.m; sourceTree = "<group>"; };
1217+
09E337831DF8361300E1A601 /* TaskSelectionCell.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = TaskSelectionCell.h; sourceTree = "<group>"; };
1218+
09E337841DF8361300E1A601 /* TaskSelectionCell.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = TaskSelectionCell.m; sourceTree = "<group>"; };
1219+
09E337861DF83C7F00E1A601 /* ScreenView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ScreenView.h; sourceTree = "<group>"; };
1220+
09E337871DF83C7F00E1A601 /* ScreenView.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = ScreenView.m; sourceTree = "<group>"; };
12151221
0A03E6D11ABD0F690034BB8E /* LocationHelper.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = LocationHelper.h; sourceTree = "<group>"; };
12161222
0A03E6D21ABD0F690034BB8E /* LocationHelper.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = LocationHelper.m; sourceTree = "<group>"; };
12171223
0A0519DF1ABA918100551B61 /* TweetSendDetailLoctionCell.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = TweetSendDetailLoctionCell.h; sourceTree = "<group>"; };
@@ -5511,6 +5517,8 @@
55115517
099F63CA1DEEFE0B00072519 /* UserActiveStatusView.m */,
55125518
09E337801DF4481400E1A601 /* TaskSelectionView.h */,
55135519
09E337811DF4481400E1A601 /* TaskSelectionView.m */,
5520+
09E337861DF83C7F00E1A601 /* ScreenView.h */,
5521+
09E337871DF83C7F00E1A601 /* ScreenView.m */,
55145522
);
55155523
path = Views;
55165524
sourceTree = "<group>";
@@ -5776,6 +5784,8 @@
57765784
093C40681DEAF781008F0AFD /* EaseUserInfoCell.m */,
57775785
093C406A1DEAF8DA008F0AFD /* UserActiveGraphCell.h */,
57785786
093C406B1DEAF8DA008F0AFD /* UserActiveGraphCell.m */,
5787+
09E337831DF8361300E1A601 /* TaskSelectionCell.h */,
5788+
09E337841DF8361300E1A601 /* TaskSelectionCell.m */,
57795789
);
57805790
path = Cell;
57815791
sourceTree = "<group>";
@@ -6942,6 +6952,7 @@
69426952
4E6318A21BDA261100EFED97 /* MRListView.m in Sources */,
69436953
D0A32BF61BF1CA8F00336C52 /* ProjectCount.m in Sources */,
69446954
099F63CB1DEEFE0B00072519 /* UserActiveStatusView.m in Sources */,
6955+
09E337851DF8361300E1A601 /* TaskSelectionCell.m in Sources */,
69456956
4EB52F381C7C38F600B5EBEA /* ResourceReference.m in Sources */,
69466957
4EA7F15D1A6D192B00A046BD /* SDWebImageDownloader.m in Sources */,
69476958
8EA6D1B419E240C40076D59C /* HtmlMedia.m in Sources */,
@@ -7113,6 +7124,7 @@
71137124
4E9E3B751DCC2DB10005FD79 /* HtmlMediaViewController.m in Sources */,
71147125
4E0BD86E1B6C7E3D0061CAA6 /* CSTopicCreateVC.m in Sources */,
71157126
4E8765651A22E5B40090CFB9 /* NSMutableArray+SWUtilityButtons.m in Sources */,
7127+
09E337881DF83C7F00E1A601 /* ScreenView.m in Sources */,
71167128
13972E2F1CA6D5C600489EBA /* MActivityInfo.m in Sources */,
71177129
8ECA8BB419FB42CC00C598C6 /* UILongPressMenuImageView.m in Sources */,
71187130
4E4D6A821B1C6D5F00FD2E49 /* FileChangesIntroduceCell.m in Sources */,

‎Coding_iOS/.DS_Store‎

0 Bytes
Binary file not shown.

‎Coding_iOS/Controllers/RootControllers/MyTask_RootViewController.m‎

Lines changed: 13 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@
1212
#import "EditTaskViewController.h"
1313
#import "RDVTabBarController.h"
1414
#import "TaskSelectionView.h"
15+
#import "ScreenView.h"
1516

1617
@interface MyTask_RootViewController ()
1718

@@ -25,7 +26,7 @@ @interface MyTask_RootViewController ()
2526
@property (strong, nonatomic) UIButton *titleBtn;
2627
@property (nonatomic,assign) NSInteger selectNum; //筛选状态
2728
@property (nonatomic, strong) TaskSelectionView *myFliterMenu;
28-
29+
@property (nonatomic, strong) ScreenView *screenView;
2930

3031
@end
3132

@@ -75,7 +76,10 @@ - (void)viewDidLoad
7576
}];
7677
icarousel;
7778
});
78-
self.navigationItem.rightBarButtonItem = [[UIBarButtonItem alloc] initWithImage:[UIImage imageNamed:@"addBtn_Nav"] style:UIBarButtonItemStylePlain target:self action:@selector(addItemClicked:)];
79+
80+
UIBarButtonItem *addBar = [[UIBarButtonItem alloc] initWithImage:[UIImage imageNamed:@"addBtn_Nav"] style:UIBarButtonItemStylePlain target:self action:@selector(addItemClicked:)];
81+
UIBarButtonItem *screenBar = [[UIBarButtonItem alloc] initWithImage:[UIImage imageNamed:@"user_info_mutualConcern"] style:UIBarButtonItemStylePlain target:self action:@selector(screenItemClicked:)];
82+
self.navigationItem.rightBarButtonItems = @[addBar, screenBar];
7983

8084

8185

@@ -88,6 +92,8 @@ - (void)viewDidLoad
8892
_myFliterMenu.closeBlock=^(){
8993
[weakSelf.myFliterMenu dismissMenu];
9094
};
95+
96+
_screenView = [ScreenView creat];
9197

9298

9399
}
@@ -103,6 +109,11 @@ - (void)addItemClicked:(id)sender{
103109
[self.navigationController pushViewController:vc animated:YES];
104110
}
105111

112+
- (void)screenItemClicked:(UIBarButtonItem *)sender {
113+
// [sender setImage:[UIImage imageNamed:@"addBtn_Nav"]];
114+
[_screenView showOrHide];
115+
}
116+
106117
- (void)didReceiveMemoryWarning
107118
{
108119
[super didReceiveMemoryWarning];

‎Coding_iOS/Controllers/RootControllers/Project_RootViewController.m‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -230,6 +230,7 @@ -(void)addItemClicked:(id)sender{
230230
[self closeMenu];
231231
}
232232
}
233+
233234
-(void)fliterClicked:(id)sender{
234235
[self closeMenu];
235236
if (_myFliterMenu.showStatus) {
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
//
2+
// TaskSelectionCell.h
3+
// Coding_iOS
4+
//
5+
// Created by 张达棣 on 16/12/7.
6+
// Copyright © 2016年 Coding. All rights reserved.
7+
//
8+
9+
#import <UIKit/UIKit.h>
10+
#define kCellIdentifier_TaskSelectionCell @"TaskSelectionCell"
11+
12+
@interface TaskSelectionCell : UITableViewCell
13+
@property (nonatomic, strong) NSString *title;
14+
@property (nonatomic, assign) BOOL isSel;
15+
16+
@end
Lines changed: 64 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,64 @@
1+
//
2+
// TaskSelectionCell.m
3+
// Coding_iOS
4+
//
5+
// Created by 张达棣 on 16/12/7.
6+
// Copyright © 2016年 Coding. All rights reserved.
7+
//
8+
9+
#import "TaskSelectionCell.h"
10+
11+
@interface TaskSelectionCell ()
12+
@property (nonatomic, strong) UILabel *titleLab;
13+
@property (nonatomic, strong) UIImageView *selImageView;
14+
@end
15+
16+
@implementation TaskSelectionCell
17+
18+
- (instancetype)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier {
19+
self = [super initWithStyle:style reuseIdentifier:reuseIdentifier];
20+
if (self) {
21+
[self creatView];
22+
}
23+
return self;
24+
}
25+
26+
- (void)awakeFromNib {
27+
[super awakeFromNib];
28+
// Initialization code
29+
}
30+
31+
- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
32+
[super setSelected:selected animated:animated];
33+
34+
// Configure the view for the selected state
35+
}
36+
37+
- (void)creatView {
38+
39+
[self.contentView.subviews makeObjectsPerformSelector:@selector(removeFromSuperview)];
40+
self.backgroundColor=[UIColor clearColor];
41+
_titleLab=[[UILabel alloc] initWithFrame:CGRectMake(20, 0, 200, 50)];
42+
_titleLab.font=[UIFont systemFontOfSize:15];
43+
[self.contentView addSubview:_titleLab];
44+
45+
_selImageView = [[UIImageView alloc] init];
46+
_selImageView.image = [UIImage imageNamed:@"location_checkmark"];
47+
[self.contentView addSubview:_selImageView];
48+
_selImageView.hidden = YES;
49+
_selImageView.sd_layout.rightSpaceToView(self.contentView, 20).centerYEqualToView(self.contentView).widthIs(14).heightIs(11);
50+
}
51+
52+
- (void)setIsSel:(BOOL)isSel {
53+
_titleLab.textColor=isSel?kColorBrandGreen:kColor222;
54+
_selImageView.hidden = !isSel;
55+
56+
}
57+
58+
- (void)setTitle:(NSString *)title {
59+
_title = title;
60+
_titleLab.text= title;
61+
62+
}
63+
64+
@end

‎Coding_iOS/Views/ScreenView.h‎

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
//
2+
// ScreenView.h
3+
// Coding_iOS
4+
//
5+
// Created by 张达棣 on 16/12/7.
6+
// Copyright © 2016年 Coding. All rights reserved.
7+
//
8+
9+
#import <UIKit/UIKit.h>
10+
11+
@interface ScreenView : UIView
12+
13+
+ (instancetype)creat;
14+
15+
- (void)showOrHide;
16+
17+
@end

‎Coding_iOS/Views/ScreenView.m‎

Lines changed: 60 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,60 @@
1+
//
2+
// ScreenView.m
3+
// Coding_iOS
4+
//
5+
// Created by 张达棣 on 16/12/7.
6+
// Copyright © 2016年 Coding. All rights reserved.
7+
//
8+
9+
#import "ScreenView.h"
10+
11+
12+
@interface ScreenView ()
13+
14+
@end
15+
16+
@implementation ScreenView
17+
18+
#pragma mark - 生命周期方法
19+
20+
- (instancetype)initWithFrame:(CGRect)frame {
21+
self = [super initWithFrame:frame];
22+
if (self) {
23+
[self creatView];
24+
}
25+
return self;
26+
}
27+
28+
29+
#pragma mark - 外部方法
30+
31+
+ (instancetype)creat {
32+
ScreenView *screenView = [[ScreenView alloc] initWithFrame:CGRectMake(0, 64, kScreen_Width, kScreen_Height - 64)];
33+
screenView.hidden = YES;
34+
[kKeyWindow addSubview:screenView];
35+
36+
return screenView;
37+
}
38+
39+
- (void)showOrHide {
40+
self.hidden = !self.hidden;
41+
}
42+
43+
#pragma makr - 消息
44+
45+
#pragma mark - 系统委托
46+
47+
#pragma mark - 自定义委托
48+
49+
#pragma mark - 响应方法
50+
51+
#pragma mark - 私有方法
52+
53+
- (void)creatView {
54+
self.backgroundColor = [UIColor colorWithRed:0/255.0 green:0/255.0 blue:0/255.0 alpha:.5];
55+
}
56+
57+
#pragma mark - get/set方法
58+
59+
60+
@end

‎Coding_iOS/Views/TaskSelectionView.h‎

Lines changed: 0 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -10,19 +10,6 @@
1010

1111
@interface TaskSelectionView : UIView
1212

13-
///**
14-
// 标题数组
15-
// */
16-
//@property (nonatomic, strong) NSArray *titleArray;
17-
//
18-
//
19-
///**
20-
// 选择后回调
21-
// */
22-
//@property (nonatomic, copy) void (^selectBlock)(NSInteger selectIndex);
23-
//
24-
//- (void)showOrHide;
25-
2613
@property (assign) BOOL showStatus;
2714
@property (nonatomic , copy) void (^clickBlock)(NSInteger selectNum);
2815
@property (nonatomic , copy) void (^closeBlock)();

‎Coding_iOS/Views/TaskSelectionView.m‎

Lines changed: 12 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@
1414
#import "ProjectCount.h"
1515
#import "Projects.h"
1616
#import "pop.h"
17+
#import "TaskSelectionCell.h"
1718

1819
@interface TaskSelectionView()<UITableViewDataSource,UITableViewDelegate>
1920
@property (nonatomic, strong) XHRealTimeBlur *realTimeBlur;
@@ -91,7 +92,7 @@ - (void)setup {
9192
tableview.backgroundColor=[UIColor clearColor];
9293
tableview.delegate=self;
9394
tableview.dataSource=self;
94-
[tableview registerClass:[UITableViewCell class] forCellReuseIdentifier:@"UITableViewCell"];
95+
[tableview registerClass:[TaskSelectionCell class] forCellReuseIdentifier:kCellIdentifier_TaskSelectionCell];
9596
tableview.tableFooterView=[UIView new];
9697
tableview.separatorStyle=UITableViewCellSeparatorStyleNone;
9798
tableview;
@@ -140,14 +141,16 @@ - (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger
140141
}
141142

142143
- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath{
143-
UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:@"UITableViewCell" forIndexPath:indexPath];
144-
[cell.contentView.subviews makeObjectsPerformSelector:@selector(removeFromSuperview)];
145-
cell.backgroundColor=[UIColor clearColor];
146-
UILabel *titleLab=[[UILabel alloc] initWithFrame:CGRectMake(20, 0, 200, 50)];
147-
titleLab.font=[UIFont systemFontOfSize:15];
148-
[cell.contentView addSubview:titleLab];
149-
titleLab.textColor=(indexPath.row==_selectNum)?kColorBrandGreen:kColor222;
150-
titleLab.text= _items[indexPath.row];
144+
TaskSelectionCell *cell = [tableView dequeueReusableCellWithIdentifier:kCellIdentifier_TaskSelectionCell forIndexPath:indexPath];
145+
cell.title = _items[indexPath.row];
146+
cell.isSel = indexPath.row==_selectNum;
147+
// [cell.contentView.subviews makeObjectsPerformSelector:@selector(removeFromSuperview)];
148+
// cell.backgroundColor=[UIColor clearColor];
149+
// UILabel *titleLab=[[UILabel alloc] initWithFrame:CGRectMake(20, 0, 200, 50)];
150+
// titleLab.font=[UIFont systemFontOfSize:15];
151+
// [cell.contentView addSubview:titleLab];
152+
// titleLab.textColor=(indexPath.row==_selectNum)?kColorBrandGreen:kColor222;
153+
// titleLab.text= _items[indexPath.row];
151154
return cell;
152155
}
153156

0 commit comments

Comments
 (0)

Back | FazBrowse Home | New Git URL