Skip to content

Commit c712a98

Browse files
author
wfh
committed
update
1 parent 8bf83ff commit c712a98

File tree

6 files changed

+822
-4
lines changed

6 files changed

+822
-4
lines changed

WFZhihuDaily.xcodeproj/project.pbxproj

+6
Original file line numberDiff line numberDiff line change
@@ -68,6 +68,7 @@
6868
5DF656951C3B6CC100D8F8E0 /* WFBaseController.m in Sources */ = {isa = PBXBuildFile; fileRef = 5DF656871C3B6CC100D8F8E0 /* WFBaseController.m */; };
6969
5DF656971C3B6CC100D8F8E0 /* WFMainController.m in Sources */ = {isa = PBXBuildFile; fileRef = 5DF6568B1C3B6CC100D8F8E0 /* WFMainController.m */; };
7070
9562680C9046DAF9802DE4C0 /* libPods.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 56D18C7690F4F098F76ED7B6 /* libPods.a */; };
71+
AACE8B6C1C5B6D31001498D9 /* FXBlurView.m in Sources */ = {isa = PBXBuildFile; fileRef = AACE8B6B1C5B6D31001498D9 /* FXBlurView.m */; };
7172
AADF34291C5B3B8100E05CDE /* WFManager+ThemeInfo.m in Sources */ = {isa = PBXBuildFile; fileRef = AADF34281C5B3B8100E05CDE /* WFManager+ThemeInfo.m */; };
7273
AADF343E1C5B477100E05CDE /* WFThemeNavBar.m in Sources */ = {isa = PBXBuildFile; fileRef = AADF343D1C5B477100E05CDE /* WFThemeNavBar.m */; };
7374
AADF34451C5B477B00E05CDE /* WFEditorModel.m in Sources */ = {isa = PBXBuildFile; fileRef = AADF34401C5B477B00E05CDE /* WFEditorModel.m */; };
@@ -207,6 +208,8 @@
207208
5DF6568A1C3B6CC100D8F8E0 /* WFMainController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = WFMainController.h; sourceTree = "<group>"; };
208209
5DF6568B1C3B6CC100D8F8E0 /* WFMainController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = WFMainController.m; sourceTree = "<group>"; };
209210
8420BF67AF1838D7B6CC5DB5 /* Pods.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = Pods.release.xcconfig; path = "Pods/Target Support Files/Pods/Pods.release.xcconfig"; sourceTree = "<group>"; };
211+
AACE8B6A1C5B6D31001498D9 /* FXBlurView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = FXBlurView.h; sourceTree = "<group>"; };
212+
AACE8B6B1C5B6D31001498D9 /* FXBlurView.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = FXBlurView.m; sourceTree = "<group>"; };
210213
AADF34271C5B3B8100E05CDE /* WFManager+ThemeInfo.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "WFManager+ThemeInfo.h"; sourceTree = "<group>"; };
211214
AADF34281C5B3B8100E05CDE /* WFManager+ThemeInfo.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = "WFManager+ThemeInfo.m"; sourceTree = "<group>"; };
212215
AADF343C1C5B477100E05CDE /* WFThemeNavBar.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = WFThemeNavBar.h; sourceTree = "<group>"; };
@@ -470,6 +473,8 @@
470473
5DF495C61C438FFB00A6D1F0 /* WFSharePanelView.m */,
471474
5DF495CB1C43A28E00A6D1F0 /* WFShareButton.h */,
472475
5DF495CC1C43A28E00A6D1F0 /* WFShareButton.m */,
476+
AACE8B6A1C5B6D31001498D9 /* FXBlurView.h */,
477+
AACE8B6B1C5B6D31001498D9 /* FXBlurView.m */,
473478
5DF495C71C438FFB00A6D1F0 /* WFWebImageShowView.h */,
474479
5DF495C81C438FFB00A6D1F0 /* WFWebImageShowView.m */,
475480
);
@@ -826,6 +831,7 @@
826831
5DA913C31C3D0FF5002C23C2 /* WFBottomBarView.m in Sources */,
827832
5DA9137D1C3CBDBB002C23C2 /* WFSportController.m in Sources */,
828833
5DF495AC1C43583300A6D1F0 /* WFOutsideWebBottomBarView.m in Sources */,
834+
AACE8B6C1C5B6D31001498D9 /* FXBlurView.m in Sources */,
829835
AADF34461C5B477B00E05CDE /* WFThemeModel.m in Sources */,
830836
5DA913B71C3CF628002C23C2 /* WFWebView.m in Sources */,
831837
5DA913761C3CBDBB002C23C2 /* WFFilmController.m in Sources */,

WFZhihuDaily/CommonController/view/WFEditorView.m

+1-1
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ - (void)configUI{
4343
- (void)setAvatarImageArr:(NSArray *)avatarImageArr{
4444

4545
float braBtnX = 60;
46-
46+
DLog(@"go here");
4747
for (WFEditorModel *editor in avatarImageArr) {
4848

4949
UIImageView *avatarImg = [[UIImageView alloc ] init];

WFZhihuDaily/CommonController/view/WFThemeNavBar.h

+3-1
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,11 @@
77
//
88

99
#import <UIKit/UIKit.h>
10-
10+
#import "FXBlurView.h"
1111
@interface WFThemeNavBar : UIImageView
1212

13+
@property (nonatomic, strong) FXBlurView *blurView;
14+
1315
/**
1416
* 添加下拉表头的动画
1517
*

WFZhihuDaily/CommonController/view/WFThemeNavBar.m

+21-2
Original file line numberDiff line numberDiff line change
@@ -16,14 +16,33 @@ - (id)initWithFrame:(CGRect)frame{
1616
self.backgroundColor = RGBColor(35, 42, 48, 1.0);
1717
self.clipsToBounds = YES;
1818
self.contentMode = UIViewContentModeScaleAspectFill;
19+
[self configBlurView];
1920
}
2021
return self;
2122
}
2223

23-
- (void)wf_parallaxHeaderViewWithOffset:(CGFloat)offset{
2424

25-
self.frame = CGRectMake(0, -74 - offset/2, kScreenWidth, 138 - offset/2);
25+
- (void)configBlurView{
26+
27+
_blurView = [[FXBlurView alloc] initWithFrame:CGRectMake(0, 0, kScreenWidth, 138)];
28+
[self addSubview:_blurView];
29+
_blurView.tintColor = [UIColor clearColor];
30+
_blurView.hidden = YES;
31+
32+
}
33+
34+
- (void)wf_parallaxHeaderViewWithOffset:(CGFloat)offset{
2635

36+
if (offset == 0.f) {
37+
_blurView.hidden = YES;
38+
}else{
39+
_blurView.hidden = NO;
40+
_blurView.blurRadius = -offset/2;
41+
}
42+
self.frame = CGRectMake(0, -74 - offset/2, kScreenWidth, 138 - offset/2);
43+
_blurView.frame = CGRectMake(0, 0, kScreenWidth, 138 - offset/2);
44+
45+
2746
}
2847

2948
@end

WFZhihuDaily/CommonView/FXBlurView.h

+81
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,81 @@
1+
//
2+
// FXBlurView.h
3+
//
4+
// Version 1.6.4
5+
//
6+
// Created by Nick Lockwood on 25/08/2013.
7+
// Copyright (c) 2013 Charcoal Design
8+
//
9+
// Distributed under the permissive zlib License
10+
// Get the latest version from here:
11+
//
12+
// https://github.com/nicklockwood/FXBlurView
13+
//
14+
// This software is provided 'as-is', without any express or implied
15+
// warranty. In no event will the authors be held liable for any damages
16+
// arising from the use of this software.
17+
//
18+
// Permission is granted to anyone to use this software for any purpose,
19+
// including commercial applications, and to alter it and redistribute it
20+
// freely, subject to the following restrictions:
21+
//
22+
// 1. The origin of this software must not be misrepresented; you must not
23+
// claim that you wrote the original software. If you use this software
24+
// in a product, an acknowledgment in the product documentation would be
25+
// appreciated but is not required.
26+
//
27+
// 2. Altered source versions must be plainly marked as such, and must not be
28+
// misrepresented as being the original software.
29+
//
30+
// 3. This notice may not be removed or altered from any source distribution.
31+
//
32+
33+
34+
#import <UIKit/UIKit.h>
35+
#import <QuartzCore/QuartzCore.h>
36+
#import <Accelerate/Accelerate.h>
37+
38+
39+
#pragma GCC diagnostic push
40+
#pragma GCC diagnostic ignored "-Wobjc-missing-property-synthesis"
41+
42+
43+
#import <Availability.h>
44+
#undef weak_ref
45+
#if __has_feature(objc_arc) && __has_feature(objc_arc_weak)
46+
#define weak_ref weak
47+
#else
48+
#define weak_ref unsafe_unretained
49+
#endif
50+
51+
52+
@interface UIImage (FXBlurView)
53+
54+
- (UIImage *)blurredImageWithRadius:(CGFloat)radius iterations:(NSUInteger)iterations tintColor:(UIColor *)tintColor;
55+
56+
@end
57+
58+
59+
@interface FXBlurView : UIView
60+
61+
+ (void)setBlurEnabled:(BOOL)blurEnabled;
62+
+ (void)setUpdatesEnabled;
63+
+ (void)setUpdatesDisabled;
64+
65+
@property (nonatomic, getter = isBlurEnabled) BOOL blurEnabled;
66+
@property (nonatomic, getter = isDynamic) BOOL dynamic;
67+
@property (nonatomic, assign) NSUInteger iterations;
68+
@property (nonatomic, assign) NSTimeInterval updateInterval;
69+
@property (nonatomic, assign) CGFloat blurRadius;
70+
@property (nonatomic, strong) UIColor *tintColor;
71+
@property (nonatomic, weak_ref) IBOutlet UIView *underlyingView;
72+
73+
- (void)updateAsynchronously:(BOOL)async completion:(void (^)())completion;
74+
75+
- (void)clearImage;
76+
77+
@end
78+
79+
80+
#pragma GCC diagnostic pop
81+

0 commit comments

Comments
 (0)