Skip to content

Commit 672347b

Browse files
author
panshiyu
committed
更新pods,加入search基础
1 parent 0a1d53e commit 672347b

12 files changed

Lines changed: 187 additions & 14 deletions

File tree

Coding_iOS.xcodeproj/project.pbxproj

Lines changed: 27 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -764,6 +764,9 @@
764764
E7A046A01A47279E00528C12 /* Helper.m in Sources */ = {isa = PBXBuildFile; fileRef = E7A0469F1A47279E00528C12 /* Helper.m */; };
765765
EBDD2E411AE7B88C0024B952 /* WMDelLabel.m in Sources */ = {isa = PBXBuildFile; fileRef = EBDD2E401AE7B88C0024B952 /* WMDelLabel.m */; };
766766
EBDD2E4E1AEA159D0024B952 /* ProjectTopicLabelView.m in Sources */ = {isa = PBXBuildFile; fileRef = EBDD2E4D1AEA159D0024B952 /* ProjectTopicLabelView.m */; };
767+
FEC419251B53A39B00C498F5 /* CSSearchVC.m in Sources */ = {isa = PBXBuildFile; fileRef = FEC419241B53A39B00C498F5 /* CSSearchVC.m */; };
768+
FEC419281B53A92600C498F5 /* CSSearchModel.m in Sources */ = {isa = PBXBuildFile; fileRef = FEC419271B53A92600C498F5 /* CSSearchModel.m */; };
769+
FEC4192B1B53A9E300C498F5 /* TMCacheExtend.m in Sources */ = {isa = PBXBuildFile; fileRef = FEC4192A1B53A9E300C498F5 /* TMCacheExtend.m */; };
767770
/* End PBXBuildFile section */
768771

769772
/* Begin PBXFileReference section */
@@ -1085,7 +1088,6 @@
10851088
4E8AF7851A53D69F00CDC3AE /* StartImagesManager.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = StartImagesManager.m; sourceTree = "<group>"; };
10861089
4E8AF7871A54068700CDC3AE /* Accelerate.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Accelerate.framework; path = System/Library/Frameworks/Accelerate.framework; sourceTree = SDKROOT; };
10871090
4E8AF7891A5406AE00CDC3AE /* QuartzCore.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = QuartzCore.framework; path = System/Library/Frameworks/QuartzCore.framework; sourceTree = SDKROOT; };
1088-
4E8C51AE1AC0177600B4C51F /* Coding_iOS-Prefix.pch.example */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = "Coding_iOS-Prefix.pch.example"; sourceTree = "<group>"; };
10891091
4E8C51AF1AC1081500B4C51F /* [email protected] */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "[email protected]"; sourceTree = "<group>"; };
10901092
4E8D5D2C1B44E03600B70936 /* [email protected] */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "[email protected]"; sourceTree = "<group>"; };
10911093
4E8D5D2D1B44E03600B70936 /* [email protected] */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "[email protected]"; sourceTree = "<group>"; };
@@ -1935,6 +1937,12 @@
19351937
EBDD2E401AE7B88C0024B952 /* WMDelLabel.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = WMDelLabel.m; sourceTree = "<group>"; };
19361938
EBDD2E4C1AEA159D0024B952 /* ProjectTopicLabelView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ProjectTopicLabelView.h; sourceTree = "<group>"; };
19371939
EBDD2E4D1AEA159D0024B952 /* ProjectTopicLabelView.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = ProjectTopicLabelView.m; sourceTree = "<group>"; };
1940+
FEC419231B53A39B00C498F5 /* CSSearchVC.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CSSearchVC.h; sourceTree = "<group>"; };
1941+
FEC419241B53A39B00C498F5 /* CSSearchVC.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = CSSearchVC.m; sourceTree = "<group>"; };
1942+
FEC419261B53A92600C498F5 /* CSSearchModel.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CSSearchModel.h; sourceTree = "<group>"; };
1943+
FEC419271B53A92600C498F5 /* CSSearchModel.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = CSSearchModel.m; sourceTree = "<group>"; };
1944+
FEC419291B53A9E300C498F5 /* TMCacheExtend.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = TMCacheExtend.h; sourceTree = "<group>"; };
1945+
FEC4192A1B53A9E300C498F5 /* TMCacheExtend.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = TMCacheExtend.m; sourceTree = "<group>"; };
19381946
/* End PBXFileReference section */
19391947

19401948
/* Begin PBXFrameworksBuildPhase section */
@@ -3047,7 +3055,6 @@
30473055
4EFE8DB81B3A5727004B7559 /* Launch Screen.xib */,
30483056
8EA6CF1719E240C40076D59C /* Coding_iOS-Info.plist */,
30493057
8EA6CF1819E240C40076D59C /* Coding_iOS-Prefix.pch */,
3050-
4E8C51AE1AC0177600B4C51F /* Coding_iOS-Prefix.pch.example */,
30513058
8EA6CF1919E240C40076D59C /* Coding_iOS.xcdatamodeld */,
30523059
8EA6CFC519E240C40076D59C /* Images.xcassets */,
30533060
8EA6CF5B19E240C40076D59C /* InfoPlist.strings */,
@@ -3066,6 +3073,7 @@
30663073
8EA6CF1B19E240C40076D59C /* Controllers */ = {
30673074
isa = PBXGroup;
30683075
children = (
3076+
FEC419221B53A35100C498F5 /* Search */,
30693077
B9A00D7D1ACA39F1008BA008 /* ProjectSetting */,
30703078
B94C1B661AC945C60000C271 /* NewProject */,
30713079
8EA6CF2819E240C40076D59C /* Login */,
@@ -3911,6 +3919,19 @@
39113919
path = WMDelLabel;
39123920
sourceTree = "<group>";
39133921
};
3922+
FEC419221B53A35100C498F5 /* Search */ = {
3923+
isa = PBXGroup;
3924+
children = (
3925+
FEC419231B53A39B00C498F5 /* CSSearchVC.h */,
3926+
FEC419241B53A39B00C498F5 /* CSSearchVC.m */,
3927+
FEC419261B53A92600C498F5 /* CSSearchModel.h */,
3928+
FEC419271B53A92600C498F5 /* CSSearchModel.m */,
3929+
FEC419291B53A9E300C498F5 /* TMCacheExtend.h */,
3930+
FEC4192A1B53A9E300C498F5 /* TMCacheExtend.m */,
3931+
);
3932+
path = Search;
3933+
sourceTree = "<group>";
3934+
};
39143935
/* End PBXGroup section */
39153936

39163937
/* Begin PBXNativeTarget section */
@@ -3943,7 +3964,7 @@
39433964
ORGANIZATIONNAME = Coding;
39443965
TargetAttributes = {
39453966
8E47700F198770E700997D05 = {
3946-
DevelopmentTeam = QN5Z87S3LH;
3967+
DevelopmentTeam = 479HDDXQ3G;
39473968
SystemCapabilities = {
39483969
com.apple.BackgroundModes = {
39493970
enabled = 0;
@@ -4686,12 +4707,14 @@
46864707
8EF643AC19FF7E2900F7EEB0 /* TweetLikeUserCCell.m in Sources */,
46874708
8E64ED7B19ED0CE3006E99DA /* QBAssetsCollectionCheckmarkView.m in Sources */,
46884709
4E4D6A701B1C68F100FD2E49 /* CommitFilesViewController.m in Sources */,
4710+
FEC419251B53A39B00C498F5 /* CSSearchVC.m in Sources */,
46894711
4E4D6A911B1D84B400FD2E49 /* FileChange.m in Sources */,
46904712
8EA6D1AB19E240C40076D59C /* main.m in Sources */,
46914713
B94C1B691AC945D30000C271 /* NewProjectViewController.m in Sources */,
46924714
4E996BD91ABA776500C704F1 /* UserInfoTextCell.m in Sources */,
46934715
4E4D6AA61B1DBA3A00FD2E49 /* MRPRDisclosureCell.m in Sources */,
46944716
8E1C3E0819E8DFE300EF3032 /* AboutViewController.m in Sources */,
4717+
FEC419281B53A92600C498F5 /* CSSearchModel.m in Sources */,
46954718
4E6BA2D71A1EE6AF005FD721 /* AFHTTPRequestOperation.m in Sources */,
46964719
4EF8181F1B05C9D8005F974B /* ProjectLineNoteActivity.m in Sources */,
46974720
8EF643A919FF7E2900F7EEB0 /* MessageMediaItemCCell.m in Sources */,
@@ -4739,6 +4762,7 @@
47394762
4E996BC91ABA754600C704F1 /* JDStatusBarStyle.m in Sources */,
47404763
8EF83F9419EB78CC00E86DE7 /* SettingTextViewController.m in Sources */,
47414764
8EA6D1B019E240C40076D59C /* Comment.m in Sources */,
4765+
FEC4192B1B53A9E300C498F5 /* TMCacheExtend.m in Sources */,
47424766
0A6E6BA71AAF4162004C0107 /* TweetSendLocationCell.m in Sources */,
47434767
4E8765651A22E5B40090CFB9 /* NSMutableArray+SWUtilityButtons.m in Sources */,
47444768
8ECA8BB419FB42CC00C598C6 /* UILongPressMenuImageView.m in Sources */,

Coding_iOS/Coding_iOS-Info.plist

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
<key>CFBundleExecutable</key>
1010
<string>${EXECUTABLE_NAME}</string>
1111
<key>CFBundleIdentifier</key>
12-
<string>net.coding.CodingForiOS</string>
12+
<string>com.dp.test1</string>
1313
<key>CFBundleInfoDictionaryVersion</key>
1414
<string>6.0</string>
1515
<key>CFBundleName</key>

Coding_iOS/Controllers/RootControllers/Tweet_RootViewController.m

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,8 @@
2424
#import "WebViewController.h"
2525
#import "TweetSendLocationDetailViewController.h"
2626

27+
#import "CSSearchVC.h"
28+
2729
@interface Tweet_RootViewController ()
2830
{
2931
CGFloat _oldPanOffsetY;
@@ -92,6 +94,10 @@ - (void)viewDidLoad
9294
// [self refreshFirst];
9395
// }];
9496

97+
CSBarButtonItem *leftBarItem =[[CSBarButtonItem alloc] initWithImage:[UIImage imageNamed:@"search_Nav"] style:UIBarButtonItemStylePlain target:self action:@selector(searchItemClicked:)];
98+
leftBarItem.showBadge = YES;
99+
[self.navigationItem setLeftBarButtonItem:leftBarItem animated:NO];
100+
95101
_tweetsDict = [[NSMutableDictionary alloc] initWithCapacity:4];
96102

97103
// 添加myTableView
@@ -240,6 +246,13 @@ - (void)deleteComment:(Comment *)comment ofTweet:(Tweet *)tweet{
240246
}];
241247
}
242248

249+
#pragma mark - search
250+
251+
- (void)searchItemClicked:(id)sender{
252+
CSSearchVC *searchVC = [[CSSearchVC alloc] init];
253+
[self.navigationController pushViewController:searchVC animated:YES];
254+
}
255+
243256
#pragma mark Refresh M
244257

245258
- (void)refreshFirst{
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
//
2+
// CSSearchModel.h
3+
// Coding_iOS
4+
//
5+
// Created by pan Shiyu on 15/7/13.
6+
// Copyright (c) 2015年 Coding. All rights reserved.
7+
//
8+
9+
#import <Foundation/Foundation.h>
10+
11+
@interface CSSearchModel : NSObject
12+
13+
14+
+ (BOOL)hasSearchBadgeShown;
15+
+ (void)invalidSearchBadge;
16+
17+
@end
Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
//
2+
// CSSearchModel.m
3+
// Coding_iOS
4+
//
5+
// Created by pan Shiyu on 15/7/13.
6+
// Copyright (c) 2015年 Coding. All rights reserved.
7+
//
8+
9+
#import "CSSearchModel.h"
10+
#import "TMCacheExtend.h"
11+
12+
#define kHasSearchBadgeShown @"com.cs.search.badge.hasShown"
13+
14+
@implementation CSSearchModel
15+
16+
+ (BOOL)hasSearchBadgeShown {
17+
BOOL hasShown = [[[TMCache TemporaryCache] objectForKey:kHasSearchBadgeShown] boolValue];
18+
return hasShown;
19+
}
20+
21+
+ (void)invalidSearchBadge{
22+
[[TMCache TemporaryCache] setObject:@(YES) forKey:kHasSearchBadgeShown];
23+
}
24+
25+
26+
@end
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
//
2+
// SearchVC.h
3+
// Coding_iOS
4+
//
5+
// Created by pan Shiyu on 15/7/13.
6+
// Copyright (c) 2015年 Coding. All rights reserved.
7+
//
8+
9+
#import <UIKit/UIKit.h>
10+
11+
@interface CSSearchVC : UIViewController
12+
13+
@end
14+
15+
//
16+
@interface CSBarButtonItem : UIBarButtonItem
17+
@property (nonatomic,assign) BOOL showBadge;
18+
@end
Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
//
2+
// SearchVC.m
3+
// Coding_iOS
4+
//
5+
// Created by pan Shiyu on 15/7/13.
6+
// Copyright (c) 2015年 Coding. All rights reserved.
7+
//
8+
9+
#import "CSSearchVC.h"
10+
11+
@interface CSSearchVC ()
12+
13+
@end
14+
15+
@implementation CSSearchVC
16+
17+
- (void)viewDidLoad {
18+
[super viewDidLoad];
19+
// Do any additional setup after loading the view.
20+
}
21+
22+
@end
23+
24+
@implementation CSBarButtonItem
25+
26+
- (void)updateBadgeValueAnimated:(BOOL)animated
27+
{
28+
NSLog(@"");
29+
}
30+
31+
@end
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
//
2+
// TMCacheExtend.h
3+
// IBY
4+
//
5+
// Created by panshiyu on 15/5/8.
6+
// Copyright (c) 2015年 com.biyao. All rights reserved.
7+
//
8+
9+
#import <Foundation/Foundation.h>
10+
#import "TMCache.h"
11+
12+
@interface TMCache (Extension)
13+
14+
+ (instancetype)TemporaryCache;
15+
+ (instancetype)PermanentCache;
16+
17+
@end
Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
//
2+
// TMCacheExtend.m
3+
// IBY
4+
//
5+
// Created by panshiyu on 15/5/8.
6+
// Copyright (c) 2015年 com.biyao. All rights reserved.
7+
//
8+
9+
#import "TMCacheExtend.h"
10+
11+
#define kTemporaryCache @"com.dv.cache.temporary"
12+
#define kPermanentCache @"com.dv.cache.permanentCache"
13+
14+
@implementation TMCache (Extension)
15+
16+
+ (instancetype)TemporaryCache{
17+
return [[TMCache sharedCache] initWithName:kTemporaryCache];
18+
}
19+
+ (instancetype)PermanentCache {
20+
return [[TMCache sharedCache] initWithName:kPermanentCache];
21+
}
22+
23+
@end

0 commit comments

Comments
 (0)