| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -15,6 +15,8 @@ | |||
| 15 | 15 | 099F63C81DEDBD0100072519 /* ActivenessModel.m in Sources */ = {isa = PBXBuildFile; fileRef = 099F63C71DEDBD0100072519 /* ActivenessModel.m */; }; | |
| 16 | 16 | 099F63CB1DEEFE0B00072519 /* UserActiveStatusView.m in Sources */ = {isa = PBXBuildFile; fileRef = 099F63CA1DEEFE0B00072519 /* UserActiveStatusView.m */; }; | |
| 17 | 17 | 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 */; }; | ||
| 18 | 20 | 0A03E6D31ABD0F690034BB8E /* LocationHelper.m in Sources */ = {isa = PBXBuildFile; fileRef = 0A03E6D21ABD0F690034BB8E /* LocationHelper.m */; }; | |
| 19 | 21 | 0A0519E21ABA918100551B61 /* TweetSendDetailLoctionCell.m in Sources */ = {isa = PBXBuildFile; fileRef = 0A0519E01ABA918100551B61 /* TweetSendDetailLoctionCell.m */; }; | |
| 20 | 22 | 0A0519E31ABA918100551B61 /* TweetSendDetailLoctionCell.xib in Resources */ = {isa = PBXBuildFile; fileRef = 0A0519E11ABA918100551B61 /* TweetSendDetailLoctionCell.xib */; }; | |
@@ -1212,6 +1214,10 @@ | |||
| 1212 | 1214 | 099F63CA1DEEFE0B00072519 /* UserActiveStatusView.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = UserActiveStatusView.m; sourceTree = "<group>"; }; | |
| 1213 | 1215 | 09E337801DF4481400E1A601 /* TaskSelectionView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = TaskSelectionView.h; sourceTree = "<group>"; }; | |
| 1214 | 1216 | 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>"; }; | ||
| 1215 | 1221 | 0A03E6D11ABD0F690034BB8E /* LocationHelper.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = LocationHelper.h; sourceTree = "<group>"; }; | |
| 1216 | 1222 | 0A03E6D21ABD0F690034BB8E /* LocationHelper.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = LocationHelper.m; sourceTree = "<group>"; }; | |
| 1217 | 1223 | 0A0519DF1ABA918100551B61 /* TweetSendDetailLoctionCell.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = TweetSendDetailLoctionCell.h; sourceTree = "<group>"; }; | |
@@ -5511,6 +5517,8 @@ | |||
| 5511 | 5517 | 099F63CA1DEEFE0B00072519 /* UserActiveStatusView.m */, | |
| 5512 | 5518 | 09E337801DF4481400E1A601 /* TaskSelectionView.h */, | |
| 5513 | 5519 | 09E337811DF4481400E1A601 /* TaskSelectionView.m */, | |
| 5520 | + 09E337861DF83C7F00E1A601 /* ScreenView.h */, | ||
| 5521 | + 09E337871DF83C7F00E1A601 /* ScreenView.m */, | ||
| 5514 | 5522 | ); | |
| 5515 | 5523 | path = Views; | |
| 5516 | 5524 | sourceTree = "<group>"; | |
@@ -5776,6 +5784,8 @@ | |||
| 5776 | 5784 | 093C40681DEAF781008F0AFD /* EaseUserInfoCell.m */, | |
| 5777 | 5785 | 093C406A1DEAF8DA008F0AFD /* UserActiveGraphCell.h */, | |
| 5778 | 5786 | 093C406B1DEAF8DA008F0AFD /* UserActiveGraphCell.m */, | |
| 5787 | + 09E337831DF8361300E1A601 /* TaskSelectionCell.h */, | ||
| 5788 | + 09E337841DF8361300E1A601 /* TaskSelectionCell.m */, | ||
| 5779 | 5789 | ); | |
| 5780 | 5790 | path = Cell; | |
| 5781 | 5791 | sourceTree = "<group>"; | |
@@ -6942,6 +6952,7 @@ | |||
| 6942 | 6952 | 4E6318A21BDA261100EFED97 /* MRListView.m in Sources */, | |
| 6943 | 6953 | D0A32BF61BF1CA8F00336C52 /* ProjectCount.m in Sources */, | |
| 6944 | 6954 | 099F63CB1DEEFE0B00072519 /* UserActiveStatusView.m in Sources */, | |
| 6955 | + 09E337851DF8361300E1A601 /* TaskSelectionCell.m in Sources */, | ||
| 6945 | 6956 | 4EB52F381C7C38F600B5EBEA /* ResourceReference.m in Sources */, | |
| 6946 | 6957 | 4EA7F15D1A6D192B00A046BD /* SDWebImageDownloader.m in Sources */, | |
| 6947 | 6958 | 8EA6D1B419E240C40076D59C /* HtmlMedia.m in Sources */, | |
@@ -7113,6 +7124,7 @@ | |||
| 7113 | 7124 | 4E9E3B751DCC2DB10005FD79 /* HtmlMediaViewController.m in Sources */, | |
| 7114 | 7125 | 4E0BD86E1B6C7E3D0061CAA6 /* CSTopicCreateVC.m in Sources */, | |
| 7115 | 7126 | 4E8765651A22E5B40090CFB9 /* NSMutableArray+SWUtilityButtons.m in Sources */, | |
| 7127 | + 09E337881DF83C7F00E1A601 /* ScreenView.m in Sources */, | ||
| 7116 | 7128 | 13972E2F1CA6D5C600489EBA /* MActivityInfo.m in Sources */, | |
| 7117 | 7129 | 8ECA8BB419FB42CC00C598C6 /* UILongPressMenuImageView.m in Sources */, | |
| 7118 | 7130 | 4E4D6A821B1C6D5F00FD2E49 /* FileChangesIntroduceCell.m in Sources */, | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -12,6 +12,7 @@ | |||
| 12 | 12 | #import "EditTaskViewController.h" | |
| 13 | 13 | #import "RDVTabBarController.h" | |
| 14 | 14 | #import "TaskSelectionView.h" | |
| 15 | + #import "ScreenView.h" | ||
| 15 | 16 | ||
| 16 | 17 | @interface MyTask_RootViewController () | |
| 17 | 18 | ||
@@ -25,7 +26,7 @@ @interface MyTask_RootViewController () | |||
| 25 | 26 | @property (strong, nonatomic) UIButton *titleBtn; | |
| 26 | 27 | @property (nonatomic,assign) NSInteger selectNum; //筛选状态 | |
| 27 | 28 | @property (nonatomic, strong) TaskSelectionView *myFliterMenu; | |
| 28 | - | ||
| 29 | + @property (nonatomic, strong) ScreenView *screenView; | ||
| 29 | 30 | ||
| 30 | 31 | @end | |
| 31 | 32 | ||
@@ -75,7 +76,10 @@ - (void)viewDidLoad | |||
| 75 | 76 | }]; | |
| 76 | 77 | icarousel; | |
| 77 | 78 | }); | |
| 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]; | ||
| 79 | 83 | ||
| 80 | 84 | ||
| 81 | 85 | ||
@@ -88,6 +92,8 @@ - (void)viewDidLoad | |||
| 88 | 92 | _myFliterMenu.closeBlock=^(){ | |
| 89 | 93 | [weakSelf.myFliterMenu dismissMenu]; | |
| 90 | 94 | }; | |
| 95 | + | ||
| 96 | + _screenView = [ScreenView creat]; | ||
| 91 | 97 | ||
| 92 | 98 | ||
| 93 | 99 | } | |
@@ -103,6 +109,11 @@ - (void)addItemClicked:(id)sender{ | |||
| 103 | 109 | [self.navigationController pushViewController:vc animated:YES]; | |
| 104 | 110 | } | |
| 105 | 111 | ||
| 112 | + - (void)screenItemClicked:(UIBarButtonItem *)sender { | ||
| 113 | + // [sender setImage:[UIImage imageNamed:@"addBtn_Nav"]]; | ||
| 114 | + [_screenView showOrHide]; | ||
| 115 | + } | ||
| 116 | + | ||
| 106 | 117 | - (void)didReceiveMemoryWarning | |
| 107 | 118 | { | |
| 108 | 119 | [super didReceiveMemoryWarning]; | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -230,6 +230,7 @@ -(void)addItemClicked:(id)sender{ | |||
| 230 | 230 | [self closeMenu]; | |
| 231 | 231 | } | |
| 232 | 232 | } | |
| 233 | + | ||
| 233 | 234 | -(void)fliterClicked:(id)sender{ | |
| 234 | 235 | [self closeMenu]; | |
| 235 | 236 | if (_myFliterMenu.showStatus) { | |
| Original file line number | Diff line number | Diff 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 | ||
| Original file line number | Diff line number | Diff 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 | ||
| Original file line number | Diff line number | Diff 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 | ||
| Original file line number | Diff line number | Diff 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 | ||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -10,19 +10,6 @@ | |||
| 10 | 10 | ||
| 11 | 11 | @interface TaskSelectionView : UIView | |
| 12 | 12 | ||
| 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 | - | ||
| 26 | 13 | @property (assign) BOOL showStatus; | |
| 27 | 14 | @property (nonatomic , copy) void (^clickBlock)(NSInteger selectNum); | |
| 28 | 15 | @property (nonatomic , copy) void (^closeBlock)(); | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -14,6 +14,7 @@ | |||
| 14 | 14 | #import "ProjectCount.h" | |
| 15 | 15 | #import "Projects.h" | |
| 16 | 16 | #import "pop.h" | |
| 17 | + #import "TaskSelectionCell.h" | ||
| 17 | 18 | ||
| 18 | 19 | @interface TaskSelectionView()<UITableViewDataSource,UITableViewDelegate> | |
| 19 | 20 | @property (nonatomic, strong) XHRealTimeBlur *realTimeBlur; | |
@@ -91,7 +92,7 @@ - (void)setup { | |||
| 91 | 92 | tableview.backgroundColor=[UIColor clearColor]; | |
| 92 | 93 | tableview.delegate=self; | |
| 93 | 94 | tableview.dataSource=self; | |
| 94 | - [tableview registerClass:[UITableViewCell class] forCellReuseIdentifier:@"UITableViewCell"]; | ||
| 95 | + [tableview registerClass:[TaskSelectionCell class] forCellReuseIdentifier:kCellIdentifier_TaskSelectionCell]; | ||
| 95 | 96 | tableview.tableFooterView=[UIView new]; | |
| 96 | 97 | tableview.separatorStyle=UITableViewCellSeparatorStyleNone; | |
| 97 | 98 | tableview; | |
@@ -140,14 +141,16 @@ - (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger | |||
| 140 | 141 | } | |
| 141 | 142 | ||
| 142 | 143 | - (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]; | ||
| 151 | 154 | return cell; | |
| 152 | 155 | } | |
| 153 | 156 | ||
| Back | FazBrowse Home | New Git URL |
0 commit comments