├── STNavBar
├── image
│ ├── 0-0.jpg
│ ├── 0-1.jpg
│ ├── 0-3.jpg
│ ├── 0-4.jpg
│ ├── IMG_0691.JPG
│ ├── IMG_0692.JPG
│ ├── IMG_0693.JPG
│ ├── IMG_0694.JPG
│ ├── IMG_0695.JPG
│ ├── IMG_0696.JPG
│ ├── IMG_0699.JPG
│ ├── ar_back.png
│ ├── home@2x.png
│ ├── search@2x.png
│ ├── message@2x.png
│ ├── detail_bar_bg.png
│ ├── footprint@2x.png
│ ├── refresh_click@2x.png
│ ├── SHJ_NoCollection@2x.png
│ ├── minidetail_share@2x.png
│ ├── but_Photograph_press@2x.png
│ └── message_collect_small@2x.png
├── GIF
│ ├── 3.6__TM_02.gif
│ └── 3.6__TM_03.gif
├── view
│ ├── Cell
│ │ ├── StTableViewCell.h
│ │ ├── StTableViewCell.m
│ │ └── StTableViewCell.xib
│ └── HeaderView
│ │ ├── BottomSectionHeaderView.h
│ │ ├── BottomTableViewHeaderView.h
│ │ ├── BottomTableViewHeaderView.m
│ │ ├── DetailHeaderView.h
│ │ ├── BottomBlurView.h
│ │ ├── DetailHeaderView.m
│ │ ├── BottomBlurView.m
│ │ ├── BottomSectionHeaderView.m
│ │ ├── BottomTableViewHeaderView.xib
│ │ └── DetailHeaderView.xib
├── controller
│ ├── ViewController.h
│ ├── DetailViewController.h
│ ├── HomePageViewController.h
│ ├── ViewController.m
│ ├── HomePageViewController.m
│ └── DetailViewController.m
├── AppDelegate.h
├── main.m
├── categary
│ ├── UIView+Extension.h
│ ├── UIButton+ImageTitleSpacing.h
│ ├── UIView+Extension.m
│ └── UIButton+ImageTitleSpacing.m
├── Tool
│ ├── NavBarSliderTool.h
│ └── NavBarSliderTool.m
├── STNavPch.pch
├── Assets.xcassets
│ └── AppIcon.appiconset
│ │ └── Contents.json
├── Info.plist
├── Base.lproj
│ └── LaunchScreen.storyboard
├── 3rd
│ ├── AdView.h
│ └── AdView.m
└── AppDelegate.m
├── STNavBar.xcodeproj
├── xcuserdata
│ └── StriEver.xcuserdatad
│ │ ├── xcdebugger
│ │ └── Breakpoints_v2.xcbkptlist
│ │ └── xcschemes
│ │ ├── xcschememanagement.plist
│ │ └── STNavBar.xcscheme
├── project.xcworkspace
│ ├── contents.xcworkspacedata
│ └── xcuserdata
│ │ └── StriEver.xcuserdatad
│ │ └── UserInterfaceState.xcuserstate
└── project.pbxproj
└── README.md
/STNavBar/image/0-0.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/strivever/ST_TianMaoSCDetailShowView/HEAD/STNavBar/image/0-0.jpg
--------------------------------------------------------------------------------
/STNavBar/image/0-1.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/strivever/ST_TianMaoSCDetailShowView/HEAD/STNavBar/image/0-1.jpg
--------------------------------------------------------------------------------
/STNavBar/image/0-3.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/strivever/ST_TianMaoSCDetailShowView/HEAD/STNavBar/image/0-3.jpg
--------------------------------------------------------------------------------
/STNavBar/image/0-4.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/strivever/ST_TianMaoSCDetailShowView/HEAD/STNavBar/image/0-4.jpg
--------------------------------------------------------------------------------
/STNavBar/GIF/3.6__TM_02.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/strivever/ST_TianMaoSCDetailShowView/HEAD/STNavBar/GIF/3.6__TM_02.gif
--------------------------------------------------------------------------------
/STNavBar/GIF/3.6__TM_03.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/strivever/ST_TianMaoSCDetailShowView/HEAD/STNavBar/GIF/3.6__TM_03.gif
--------------------------------------------------------------------------------
/STNavBar/image/IMG_0691.JPG:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/strivever/ST_TianMaoSCDetailShowView/HEAD/STNavBar/image/IMG_0691.JPG
--------------------------------------------------------------------------------
/STNavBar/image/IMG_0692.JPG:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/strivever/ST_TianMaoSCDetailShowView/HEAD/STNavBar/image/IMG_0692.JPG
--------------------------------------------------------------------------------
/STNavBar/image/IMG_0693.JPG:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/strivever/ST_TianMaoSCDetailShowView/HEAD/STNavBar/image/IMG_0693.JPG
--------------------------------------------------------------------------------
/STNavBar/image/IMG_0694.JPG:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/strivever/ST_TianMaoSCDetailShowView/HEAD/STNavBar/image/IMG_0694.JPG
--------------------------------------------------------------------------------
/STNavBar/image/IMG_0695.JPG:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/strivever/ST_TianMaoSCDetailShowView/HEAD/STNavBar/image/IMG_0695.JPG
--------------------------------------------------------------------------------
/STNavBar/image/IMG_0696.JPG:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/strivever/ST_TianMaoSCDetailShowView/HEAD/STNavBar/image/IMG_0696.JPG
--------------------------------------------------------------------------------
/STNavBar/image/IMG_0699.JPG:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/strivever/ST_TianMaoSCDetailShowView/HEAD/STNavBar/image/IMG_0699.JPG
--------------------------------------------------------------------------------
/STNavBar/image/ar_back.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/strivever/ST_TianMaoSCDetailShowView/HEAD/STNavBar/image/ar_back.png
--------------------------------------------------------------------------------
/STNavBar/image/home@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/strivever/ST_TianMaoSCDetailShowView/HEAD/STNavBar/image/home@2x.png
--------------------------------------------------------------------------------
/STNavBar/image/search@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/strivever/ST_TianMaoSCDetailShowView/HEAD/STNavBar/image/search@2x.png
--------------------------------------------------------------------------------
/STNavBar/image/message@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/strivever/ST_TianMaoSCDetailShowView/HEAD/STNavBar/image/message@2x.png
--------------------------------------------------------------------------------
/STNavBar/image/detail_bar_bg.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/strivever/ST_TianMaoSCDetailShowView/HEAD/STNavBar/image/detail_bar_bg.png
--------------------------------------------------------------------------------
/STNavBar/image/footprint@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/strivever/ST_TianMaoSCDetailShowView/HEAD/STNavBar/image/footprint@2x.png
--------------------------------------------------------------------------------
/STNavBar/image/refresh_click@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/strivever/ST_TianMaoSCDetailShowView/HEAD/STNavBar/image/refresh_click@2x.png
--------------------------------------------------------------------------------
/STNavBar/image/SHJ_NoCollection@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/strivever/ST_TianMaoSCDetailShowView/HEAD/STNavBar/image/SHJ_NoCollection@2x.png
--------------------------------------------------------------------------------
/STNavBar/image/minidetail_share@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/strivever/ST_TianMaoSCDetailShowView/HEAD/STNavBar/image/minidetail_share@2x.png
--------------------------------------------------------------------------------
/STNavBar/image/but_Photograph_press@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/strivever/ST_TianMaoSCDetailShowView/HEAD/STNavBar/image/but_Photograph_press@2x.png
--------------------------------------------------------------------------------
/STNavBar/image/message_collect_small@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/strivever/ST_TianMaoSCDetailShowView/HEAD/STNavBar/image/message_collect_small@2x.png
--------------------------------------------------------------------------------
/STNavBar.xcodeproj/xcuserdata/StriEver.xcuserdatad/xcdebugger/Breakpoints_v2.xcbkptlist:
--------------------------------------------------------------------------------
1 |
2 |
5 |
6 |
--------------------------------------------------------------------------------
/STNavBar.xcodeproj/project.xcworkspace/contents.xcworkspacedata:
--------------------------------------------------------------------------------
1 |
2 |
4 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/STNavBar.xcodeproj/project.xcworkspace/xcuserdata/StriEver.xcuserdatad/UserInterfaceState.xcuserstate:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/strivever/ST_TianMaoSCDetailShowView/HEAD/STNavBar.xcodeproj/project.xcworkspace/xcuserdata/StriEver.xcuserdatad/UserInterfaceState.xcuserstate
--------------------------------------------------------------------------------
/STNavBar/view/Cell/StTableViewCell.h:
--------------------------------------------------------------------------------
1 | //
2 | // StTableViewCell.h
3 | // STNavBar
4 | //
5 | // Created by StriEver on 16/8/9.
6 | // Copyright © 2016年 StriEver. All rights reserved.
7 | //
8 |
9 | #import
10 |
11 | @interface StTableViewCell : UITableViewCell
12 |
13 | @end
14 |
--------------------------------------------------------------------------------
/STNavBar/controller/ViewController.h:
--------------------------------------------------------------------------------
1 | //
2 | // ViewController.h
3 | // STNavBar
4 | //
5 | // Created by StriEver on 16/8/5.
6 | // Copyright © 2016年 StriEver. All rights reserved.
7 | //
8 |
9 | #import
10 |
11 | @interface ViewController : UIViewController
12 |
13 |
14 | @end
15 |
16 |
--------------------------------------------------------------------------------
/STNavBar/controller/DetailViewController.h:
--------------------------------------------------------------------------------
1 | //
2 | // DetailViewController.h
3 | // STNavBar
4 | //
5 | // Created by StriEver on 16/8/8.
6 | // Copyright © 2016年 StriEver. All rights reserved.
7 | //
8 |
9 | #import
10 |
11 | @interface DetailViewController : UIViewController
12 |
13 | @end
14 |
--------------------------------------------------------------------------------
/STNavBar/view/HeaderView/BottomSectionHeaderView.h:
--------------------------------------------------------------------------------
1 | //
2 | // BottomSectionHeaderView.h
3 | // STNavBar
4 | //
5 | // Created by StriEver on 16/8/9.
6 | // Copyright © 2016年 StriEver. All rights reserved.
7 | //
8 |
9 | #import
10 |
11 | @interface BottomSectionHeaderView : UIView
12 |
13 | @end
14 |
--------------------------------------------------------------------------------
/STNavBar/controller/HomePageViewController.h:
--------------------------------------------------------------------------------
1 | //
2 | // HomePageViewController.h
3 | // STNavBar
4 | //
5 | // Created by StriEver on 16/8/5.
6 | // Copyright © 2016年 StriEver. All rights reserved.
7 | //
8 |
9 | #import
10 |
11 | @interface HomePageViewController : UIViewController
12 |
13 | @end
14 |
--------------------------------------------------------------------------------
/STNavBar/view/HeaderView/BottomTableViewHeaderView.h:
--------------------------------------------------------------------------------
1 | //
2 | // BottomTableViewHeaderView.h
3 | // STNavBar
4 | //
5 | // Created by StriEver on 16/8/8.
6 | // Copyright © 2016年 StriEver. All rights reserved.
7 | //
8 |
9 | #import
10 |
11 | @interface BottomTableViewHeaderView : UIView
12 | + (instancetype)view;
13 | @end
14 |
--------------------------------------------------------------------------------
/STNavBar/AppDelegate.h:
--------------------------------------------------------------------------------
1 | //
2 | // AppDelegate.h
3 | // STNavBar
4 | //
5 | // Created by StriEver on 16/8/5.
6 | // Copyright © 2016年 StriEver. All rights reserved.
7 | //
8 |
9 | #import
10 |
11 | @interface AppDelegate : UIResponder
12 |
13 | @property (strong, nonatomic) UIWindow *window;
14 |
15 |
16 | @end
17 |
18 |
--------------------------------------------------------------------------------
/STNavBar/main.m:
--------------------------------------------------------------------------------
1 | //
2 | // main.m
3 | // STNavBar
4 | //
5 | // Created by StriEver on 16/8/5.
6 | // Copyright © 2016年 StriEver. All rights reserved.
7 | //
8 |
9 | #import
10 | #import "AppDelegate.h"
11 |
12 | int main(int argc, char * argv[]) {
13 | @autoreleasepool {
14 | return UIApplicationMain(argc, argv, nil, NSStringFromClass([AppDelegate class]));
15 | }
16 | }
17 |
--------------------------------------------------------------------------------
/STNavBar/view/HeaderView/BottomTableViewHeaderView.m:
--------------------------------------------------------------------------------
1 | //
2 | // BottomTableViewHeaderView.m
3 | // STNavBar
4 | //
5 | // Created by StriEver on 16/8/8.
6 | // Copyright © 2016年 StriEver. All rights reserved.
7 | //
8 |
9 | #import "BottomTableViewHeaderView.h"
10 |
11 | @implementation BottomTableViewHeaderView
12 | + (instancetype)view{
13 | return [[NSBundle mainBundle]loadNibNamed:@"BottomTableViewHeaderView" owner:nil options:nil][0];
14 | }
15 |
16 | @end
17 |
--------------------------------------------------------------------------------
/STNavBar/categary/UIView+Extension.h:
--------------------------------------------------------------------------------
1 | //
2 | // UIView+Extension.h
3 | //
4 |
5 | #import
6 |
7 | @interface UIView (Extension)
8 | @property (nonatomic, assign) CGFloat x;
9 | @property (nonatomic, assign) CGFloat y;
10 | @property (nonatomic, assign) CGFloat centerX;
11 | @property (nonatomic, assign) CGFloat centerY;
12 | @property (nonatomic, assign) CGFloat width;
13 | @property (nonatomic, assign) CGFloat height;
14 | @property (nonatomic, assign) CGSize size;
15 | @end
16 |
--------------------------------------------------------------------------------
/STNavBar/view/HeaderView/DetailHeaderView.h:
--------------------------------------------------------------------------------
1 | //
2 | // DetailHeaderView.h
3 | // STNavBar
4 | //
5 | // Created by StriEver on 16/8/8.
6 | // Copyright © 2016年 StriEver. All rights reserved.
7 | //
8 |
9 | #import
10 |
11 | @interface DetailHeaderView : UIView
12 | @property (weak, nonatomic) IBOutlet NSLayoutConstraint *midViewTopContraint;
13 | @property (weak, nonatomic) IBOutlet UIView *adBackView;
14 | + (instancetype)view;
15 | - (void)upDateBottomViewContraint:(CGFloat)contraint;
16 | @end
17 |
--------------------------------------------------------------------------------
/STNavBar/view/HeaderView/BottomBlurView.h:
--------------------------------------------------------------------------------
1 | //
2 | // BottomBlurView.h
3 | // STNavBar
4 | //
5 | // Created by StriEver on 16/8/9.
6 | // Copyright © 2016年 StriEver. All rights reserved.
7 | //
8 |
9 | #import
10 | typedef void(^viewTouchEvent) (void);
11 | @interface BottomBlurView : UIView
12 | @property (nonatomic, strong) UIImage * backImage;
13 | @property (nonatomic, copy) viewTouchEvent viewTouchEvent;
14 |
15 | - (instancetype)initWithFrame:(CGRect)frame backImage:(UIImage *)image;
16 | @end
17 |
--------------------------------------------------------------------------------
/STNavBar/view/Cell/StTableViewCell.m:
--------------------------------------------------------------------------------
1 | //
2 | // StTableViewCell.m
3 | // STNavBar
4 | //
5 | // Created by StriEver on 16/8/9.
6 | // Copyright © 2016年 StriEver. All rights reserved.
7 | //
8 |
9 | #import "StTableViewCell.h"
10 |
11 | @implementation StTableViewCell
12 |
13 | - (void)awakeFromNib {
14 | [super awakeFromNib];
15 | // Initialization code
16 | }
17 |
18 | - (void)setSelected:(BOOL)selected animated:(BOOL)animated {
19 | [super setSelected:selected animated:animated];
20 |
21 | // Configure the view for the selected state
22 | }
23 |
24 | @end
25 |
--------------------------------------------------------------------------------
/STNavBar.xcodeproj/xcuserdata/StriEver.xcuserdatad/xcschemes/xcschememanagement.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | SchemeUserState
6 |
7 | STNavBar.xcscheme
8 |
9 | orderHint
10 | 0
11 |
12 |
13 | SuppressBuildableAutocreation
14 |
15 | D358B7CF1D54872E003FD81E
16 |
17 | primary
18 |
19 |
20 |
21 |
22 |
23 |
--------------------------------------------------------------------------------
/STNavBar/Tool/NavBarSliderTool.h:
--------------------------------------------------------------------------------
1 | //
2 | // NavBarSliderTool.h
3 | // STNavBar
4 | //
5 | // Created by StriEver on 16/8/8.
6 | // Copyright © 2016年 StriEver. All rights reserved.
7 | //
8 |
9 | #import
10 | #import
11 | @interface NavBarSliderTool : NSObject
12 | @property (nonatomic, strong) UIColor * barColor;
13 | @property (nonatomic, strong) UIView * navBarBgView;
14 | @property (nonatomic, weak) UIScrollView * scrollView;
15 | @property (nonatomic, weak) UIViewController * viewController;
16 | - (void)setViewController:(UIViewController *)viewController scrollview:(UIScrollView *)scrollView;
17 | @end
18 |
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | # ST_TianMaoSCDetailShowView
2 | ###一.快速集成导航栏滑动渐变效果
3 | 
4 | ####封装了NavBarSliderTool 快捷集成导航栏滑动效果
5 | 使用方法:
6 | 1. 设置ViewController一个实例变量 `@property (nonatomic, strong)NavBarSliderTool * sliderTool;`
7 | 2. 创建一个对象`_sliderTool = [[NavBarSliderTool alloc]init];`
8 | `_sliderTool.barColor = [UIColor redColor];`
9 | 3. 调用方法 `[_sliderTool setViewController:self scrollview:self.tableView];`
10 | ###二.完整实现了仿天猫购物商城商品展示界面
11 | 
12 |
13 |
--------------------------------------------------------------------------------
/STNavBar/STNavPch.pch:
--------------------------------------------------------------------------------
1 | //
2 | // STNavPch.pch
3 | // STNavBar
4 | //
5 | // Created by StriEver on 16/8/8.
6 | // Copyright © 2016年 StriEver. All rights reserved.
7 | //
8 |
9 | #ifndef STNavPch_pch
10 | #define STNavPch_pch
11 | #import "UIView+Extension.h"
12 | //定义高度
13 | #define kUIScreenSize [UIScreen mainScreen].bounds.size
14 | #define kUIScreenWidth kUIScreenSize.width
15 | #define kUIScreenHeight kUIScreenSize.height
16 | // Include any system framework and library headers here that should be included in all compilation units.
17 | // You will also need to set the Prefix Header build setting of one or more of your targets to reference this file.
18 |
19 | #endif /* STNavPch_pch */
20 |
--------------------------------------------------------------------------------
/STNavBar/view/HeaderView/DetailHeaderView.m:
--------------------------------------------------------------------------------
1 | //
2 | // DetailHeaderView.m
3 | // STNavBar
4 | //
5 | // Created by StriEver on 16/8/8.
6 | // Copyright © 2016年 StriEver. All rights reserved.
7 | //
8 |
9 | #import "DetailHeaderView.h"
10 |
11 | @implementation DetailHeaderView
12 |
13 | + (instancetype)view{
14 | return [[NSBundle mainBundle]loadNibNamed:@"DetailHeaderView" owner:nil options:nil][0];
15 | }
16 | - (void)upDateBottomViewContraint:(CGFloat)contraint{
17 | contraint = contraint * .6;
18 | if (contraint <= 0) {
19 | contraint = 0;
20 | }
21 | [self layoutIfNeeded];
22 | [UIView animateWithDuration:.1 animations:^{
23 | _midViewTopContraint.constant = -contraint;
24 | [self layoutIfNeeded];
25 | }];
26 | }
27 | @end
28 |
--------------------------------------------------------------------------------
/STNavBar/Assets.xcassets/AppIcon.appiconset/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "images" : [
3 | {
4 | "idiom" : "iphone",
5 | "size" : "29x29",
6 | "scale" : "2x"
7 | },
8 | {
9 | "idiom" : "iphone",
10 | "size" : "29x29",
11 | "scale" : "3x"
12 | },
13 | {
14 | "idiom" : "iphone",
15 | "size" : "40x40",
16 | "scale" : "2x"
17 | },
18 | {
19 | "idiom" : "iphone",
20 | "size" : "40x40",
21 | "scale" : "3x"
22 | },
23 | {
24 | "idiom" : "iphone",
25 | "size" : "60x60",
26 | "scale" : "2x"
27 | },
28 | {
29 | "idiom" : "iphone",
30 | "size" : "60x60",
31 | "scale" : "3x"
32 | }
33 | ],
34 | "info" : {
35 | "version" : 1,
36 | "author" : "xcode"
37 | }
38 | }
--------------------------------------------------------------------------------
/STNavBar/categary/UIButton+ImageTitleSpacing.h:
--------------------------------------------------------------------------------
1 | //
2 | // UIButton+ImageTitleSpacing.h
3 | // SystemPreferenceDemo
4 | //
5 | // Created by moyekong on 12/28/15.
6 | // Copyright © 2015 wiwide. All rights reserved.
7 | //
8 |
9 | #import
10 |
11 | typedef NS_ENUM(NSUInteger, MKButtonEdgeInsetsStyle) {
12 | MKButtonEdgeInsetsStyleTop, // image在上,label在下
13 | MKButtonEdgeInsetsStyleLeft, // image在左,label在右
14 | MKButtonEdgeInsetsStyleBottom, // image在下,label在上
15 | MKButtonEdgeInsetsStyleRight // image在右,label在左
16 | };
17 |
18 | @interface UIButton (ImageTitleSpacing)
19 |
20 | /**
21 | * 设置button的titleLabel和imageView的布局样式,及间距
22 | *
23 | * @param style titleLabel和imageView的布局样式
24 | * @param space titleLabel和imageView的间距
25 | */
26 | - (void)layoutButtonWithEdgeInsetsStyle:(MKButtonEdgeInsetsStyle)style
27 | imageTitleSpace:(CGFloat)space;
28 |
29 | @end
30 |
--------------------------------------------------------------------------------
/STNavBar/view/HeaderView/BottomBlurView.m:
--------------------------------------------------------------------------------
1 | //
2 | // BottomBlurView.m
3 | // STNavBar
4 | //
5 | // Created by StriEver on 16/8/9.
6 | // Copyright © 2016年 StriEver. All rights reserved.
7 | //
8 |
9 | #import "BottomBlurView.h"
10 |
11 | @implementation BottomBlurView
12 |
13 | - (instancetype)initWithFrame:(CGRect)frame backImage:(UIImage *)image{
14 | if (self = [super initWithFrame:frame]) {
15 | self.backImage = image;
16 | [self setupViews];
17 | }
18 | return self;
19 | }
20 | - (void)setupViews{
21 | UIImageView * imageView = [[UIImageView alloc]initWithFrame:CGRectMake(0, 0, self.width, self.height)];
22 | imageView.image = self.backImage;
23 | [self addSubview:imageView];
24 |
25 | UIToolbar *toolbar = [[UIToolbar alloc] initWithFrame:CGRectMake(0, 0, imageView.width, imageView.height)];
26 | toolbar.barStyle = UIBarStyleBlackTranslucent;
27 | [imageView addSubview:toolbar];
28 |
29 | }
30 | - (void)touchesBegan:(NSSet *)touches withEvent:(UIEvent *)event{
31 | self.viewTouchEvent ? self.viewTouchEvent() : nil;
32 | }
33 | @end
34 |
--------------------------------------------------------------------------------
/STNavBar/Info.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | CFBundleDevelopmentRegion
6 | en
7 | CFBundleExecutable
8 | $(EXECUTABLE_NAME)
9 | CFBundleIdentifier
10 | $(PRODUCT_BUNDLE_IDENTIFIER)
11 | CFBundleInfoDictionaryVersion
12 | 6.0
13 | CFBundleName
14 | $(PRODUCT_NAME)
15 | CFBundlePackageType
16 | APPL
17 | CFBundleShortVersionString
18 | 1.0
19 | CFBundleSignature
20 | ????
21 | CFBundleVersion
22 | 1
23 | LSRequiresIPhoneOS
24 |
25 | UILaunchStoryboardName
26 | LaunchScreen
27 | UIRequiredDeviceCapabilities
28 |
29 | armv7
30 |
31 | UISupportedInterfaceOrientations
32 |
33 | UIInterfaceOrientationPortrait
34 | UIInterfaceOrientationLandscapeLeft
35 | UIInterfaceOrientationLandscapeRight
36 |
37 |
38 |
39 |
--------------------------------------------------------------------------------
/STNavBar/view/HeaderView/BottomSectionHeaderView.m:
--------------------------------------------------------------------------------
1 | //
2 | // BottomSectionHeaderView.m
3 | // STNavBar
4 | //
5 | // Created by StriEver on 16/8/9.
6 | // Copyright © 2016年 StriEver. All rights reserved.
7 | //
8 |
9 | #import "BottomSectionHeaderView.h"
10 | #import "UIButton+ImageTitleSpacing.h"
11 | @implementation BottomSectionHeaderView
12 | - (instancetype)init{
13 | if (self == [super init]) {
14 | self.backgroundColor = [UIColor colorWithRed:246/255.0 green:246/255.0 blue:246/255.0 alpha:1];
15 | [self setupViews];
16 | }
17 | return self;
18 | }
19 | - (void)setupViews{
20 | NSArray * btnArray = @[@"首页",@"搜索",@"消息",@"足迹",@"收藏"];
21 | NSArray * imageName = @[@"home",@"search",@"message",@"footprint",@"SHJ_NoCollection"];
22 | [btnArray enumerateObjectsUsingBlock:^(id _Nonnull obj, NSUInteger idx, BOOL * _Nonnull stop) {
23 | NSString * title = obj;
24 | UIButton * btn = [UIButton buttonWithType:UIButtonTypeCustom];
25 | [btn setTitle:title forState:UIControlStateNormal];
26 | btn.titleLabel.font = [UIFont systemFontOfSize:14];
27 | [btn setImage:[UIImage imageNamed:imageName[idx]] forState:UIControlStateNormal];
28 | btn.frame = CGRectMake(8 + idx * ((kUIScreenWidth - 48)/5 + 8) , 20, (kUIScreenWidth - 48)/5, (kUIScreenWidth - 48)/5);
29 | [btn layoutButtonWithEdgeInsetsStyle:MKButtonEdgeInsetsStyleTop imageTitleSpace:2];
30 | [btn setTitleColor:[UIColor lightGrayColor] forState:UIControlStateNormal];
31 | [self addSubview:btn];
32 | }];
33 |
34 | }
35 | @end
36 |
--------------------------------------------------------------------------------
/STNavBar/controller/ViewController.m:
--------------------------------------------------------------------------------
1 | //
2 | // ViewController.m
3 | // STNavBar
4 | //
5 | // Created by StriEver on 16/8/5.
6 | // Copyright © 2016年 StriEver. All rights reserved.
7 | //
8 |
9 | #import "ViewController.h"
10 |
11 | @interface ViewController ()
12 | @property (nonatomic, weak)IBOutlet UITableView * tableView;
13 | @end
14 |
15 | @implementation ViewController
16 |
17 | - (void)viewDidLoad {
18 | [super viewDidLoad];
19 | self.tableView.frame = CGRectMake(0, 0, 375, 668);
20 | [self.tableView registerClass:[UITableViewCell class] forCellReuseIdentifier:@"UITableViewCell"];
21 | // self.automaticallyAdjustsScrollViewInsets = NO;
22 | // Do any additional setup after loading the view, typically from a nib.
23 | }
24 |
25 | - (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath{
26 | static NSString * cellID = @"UITableViewCell";
27 | UITableViewCell * cell = [tableView dequeueReusableCellWithIdentifier:cellID forIndexPath:indexPath];
28 | if (!cell) {
29 | cell = [[UITableViewCell alloc]initWithStyle:UITableViewCellStyleDefault reuseIdentifier:cellID];
30 | }
31 | cell.textLabel.text = [NSString stringWithFormat:@"%d",indexPath.row];
32 | return cell;
33 | }
34 | - (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section{
35 | return 100;
36 | }
37 |
38 | - (void)scrollViewDidScroll:(UIScrollView *)scrollView{
39 | if (scrollView.contentOffset.y > 0) {
40 |
41 | self.navigationController.navigationBar.alpha = 1 - MIN(scrollView.contentOffset.y, 64)/64.0;
42 | }else{
43 | self.navigationController.navigationBar.alpha = 1;
44 | }
45 |
46 | }
47 | @end
48 |
--------------------------------------------------------------------------------
/STNavBar/Base.lproj/LaunchScreen.storyboard:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
--------------------------------------------------------------------------------
/STNavBar/categary/UIView+Extension.m:
--------------------------------------------------------------------------------
1 | //
2 | // UIView+Extension.m
3 | //
4 |
5 | #import "UIView+Extension.h"
6 |
7 | @implementation UIView (Extension)
8 |
9 | - (void)setX:(CGFloat)x
10 | {
11 | CGRect frame = self.frame;
12 | frame.origin.x = x;
13 | self.frame = frame;
14 | }
15 |
16 | - (CGFloat)x
17 | {
18 | return self.frame.origin.x;
19 | }
20 |
21 | - (void)setY:(CGFloat)y
22 | {
23 | CGRect frame = self.frame;
24 | frame.origin.y = y;
25 | self.frame = frame;
26 | }
27 |
28 | - (CGFloat)y
29 | {
30 | return self.frame.origin.y;
31 | }
32 |
33 | - (void)setCenterX:(CGFloat)centerX
34 | {
35 | CGPoint center = self.center;
36 | center.x = centerX;
37 | self.center = center;
38 | }
39 |
40 | - (CGFloat)centerX
41 | {
42 | return self.center.x;
43 | }
44 |
45 | - (void)setCenterY:(CGFloat)centerY
46 | {
47 | CGPoint center = self.center;
48 | center.y = centerY;
49 | self.center = center;
50 | }
51 |
52 | - (CGFloat)centerY
53 | {
54 | return self.center.y;
55 | }
56 |
57 | - (void)setWidth:(CGFloat)width
58 | {
59 | CGRect frame = self.frame;
60 | frame.size.width = width;
61 | self.frame = frame;
62 | }
63 |
64 | - (CGFloat)width
65 | {
66 | return self.frame.size.width;
67 | }
68 |
69 | - (void)setHeight:(CGFloat)height
70 | {
71 | CGRect frame = self.frame;
72 | frame.size.height = height;
73 | self.frame = frame;
74 | }
75 |
76 | - (CGFloat)height
77 | {
78 | return self.frame.size.height;
79 | }
80 |
81 | - (void)setSize:(CGSize)size
82 | {
83 | // self.width = size.width;
84 | // self.height = size.height;
85 | CGRect frame = self.frame;
86 | frame.size = size;
87 | self.frame = frame;
88 | }
89 |
90 | - (CGSize)size
91 | {
92 | return self.frame.size;
93 | }
94 |
95 | @end
96 |
--------------------------------------------------------------------------------
/STNavBar/Tool/NavBarSliderTool.m:
--------------------------------------------------------------------------------
1 | //
2 | // NavBarSliderTool.m
3 | // STNavBar
4 | //
5 | // Created by StriEver on 16/8/8.
6 | // Copyright © 2016年 StriEver. All rights reserved.
7 | //
8 |
9 | #import "NavBarSliderTool.h"
10 |
11 | @implementation NavBarSliderTool
12 | - (void)dealloc{
13 | @try {
14 | [self.scrollView removeObserver:self forKeyPath:@"contentOffset"];
15 | } @catch (NSException *exception) {
16 |
17 | } @finally {
18 |
19 | }
20 | }
21 | - (void)setViewController:(UIViewController *)viewController scrollview:(UIScrollView *)scrollView{
22 | [[UIApplication sharedApplication] setStatusBarHidden:YES];
23 | [viewController.navigationController.navigationBar setBackgroundImage:[UIImage new] forBarMetrics:UIBarMetricsCompact];
24 | viewController.navigationController.navigationBar.clipsToBounds = YES;
25 | [viewController.navigationController.navigationBar setShadowImage:[UIImage new]];
26 | [viewController.view insertSubview:self.navBarBgView atIndex:viewController.view.subviews.count];
27 | self.scrollView = scrollView;
28 | [scrollView addObserver:self forKeyPath:@"contentOffset" options:NSKeyValueObservingOptionNew context:nil];
29 | self.viewController = viewController;
30 | // self.viewController.navigationItem.titleView
31 | }
32 | - (UIView *)navBarBgView{
33 | if (!_navBarBgView) {
34 | _navBarBgView = [[UIView alloc]initWithFrame:CGRectMake(0, 0, 375, 64)];
35 | _navBarBgView.backgroundColor = self.barColor;
36 | _navBarBgView.alpha = 0;
37 | }
38 | return _navBarBgView;
39 | }
40 | - (void)observeValueForKeyPath:(NSString *)keyPath ofObject:(id)object change:(NSDictionary *)change context:(void *)context{
41 | if ([keyPath isEqualToString:@"contentOffset"]) {
42 | NSLog(@"%@",[change objectForKey:@"new"]);
43 | CGPoint point = [[change objectForKey:@"new"] CGPointValue];
44 | CGFloat y = point.y;
45 | if (y >= 0) {
46 | self.navBarBgView.alpha = y/64.0;
47 | }
48 | //根据偏移是否隐藏导航栏Items
49 | [_viewController.navigationItem.leftBarButtonItems enumerateObjectsUsingBlock:^(UIBarButtonItem * _Nonnull obj, NSUInteger idx, BOOL * _Nonnull stop) {
50 | obj.customView.hidden = y >= 0 ? YES : NO;
51 | }];
52 | [_viewController.navigationItem.rightBarButtonItems enumerateObjectsUsingBlock:^(UIBarButtonItem * _Nonnull obj, NSUInteger idx, BOOL * _Nonnull stop) {
53 | obj.customView.alpha = y >= 0 ? YES : NO;
54 | }];
55 | }
56 |
57 | }
58 | @end
59 |
--------------------------------------------------------------------------------
/STNavBar/categary/UIButton+ImageTitleSpacing.m:
--------------------------------------------------------------------------------
1 | //
2 | // UIButton+ImageTitleSpacing.m
3 | // SystemPreferenceDemo
4 | //
5 | // Created by moyekong on 12/28/15.
6 | // Copyright © 2015 wiwide. All rights reserved.
7 | //
8 |
9 | #import "UIButton+ImageTitleSpacing.h"
10 |
11 | @implementation UIButton (ImageTitleSpacing)
12 |
13 | - (void)layoutButtonWithEdgeInsetsStyle:(MKButtonEdgeInsetsStyle)style
14 | imageTitleSpace:(CGFloat)space
15 | {
16 | // self.backgroundColor = [UIColor cyanColor];
17 |
18 | /**
19 | * 前置知识点:titleEdgeInsets是title相对于其上下左右的inset,跟tableView的contentInset是类似的,
20 | * 如果只有title,那它上下左右都是相对于button的,image也是一样;
21 | * 如果同时有image和label,那这时候image的上左下是相对于button,右边是相对于label的;title的上右下是相对于button,左边是相对于image的。
22 | */
23 |
24 |
25 | // 1. 得到imageView和titleLabel的宽、高
26 | CGFloat imageWith = self.imageView.frame.size.width;
27 | CGFloat imageHeight = self.imageView.frame.size.height;
28 |
29 | CGFloat labelWidth = 0.0;
30 | CGFloat labelHeight = 0.0;
31 | if ([UIDevice currentDevice].systemVersion.floatValue >= 8.0) {
32 | // 由于iOS8中titleLabel的size为0,用下面的这种设置
33 | labelWidth = self.titleLabel.intrinsicContentSize.width;
34 | labelHeight = self.titleLabel.intrinsicContentSize.height;
35 | } else {
36 | labelWidth = self.titleLabel.frame.size.width;
37 | labelHeight = self.titleLabel.frame.size.height;
38 | }
39 |
40 | // 2. 声明全局的imageEdgeInsets和labelEdgeInsets
41 | UIEdgeInsets imageEdgeInsets = UIEdgeInsetsZero;
42 | UIEdgeInsets labelEdgeInsets = UIEdgeInsetsZero;
43 |
44 | // 3. 根据style和space得到imageEdgeInsets和labelEdgeInsets的值
45 | switch (style) {
46 | case MKButtonEdgeInsetsStyleTop:
47 | {
48 | imageEdgeInsets = UIEdgeInsetsMake(-labelHeight-space/2.0, 0, 0, -labelWidth);
49 | labelEdgeInsets = UIEdgeInsetsMake(0, -imageWith, -imageHeight-space/2.0, 0);
50 | }
51 | break;
52 | case MKButtonEdgeInsetsStyleLeft:
53 | {
54 | imageEdgeInsets = UIEdgeInsetsMake(0, -space/2.0, 0, space/2.0);
55 | labelEdgeInsets = UIEdgeInsetsMake(0, space/2.0, 0, -space/2.0);
56 | }
57 | break;
58 | case MKButtonEdgeInsetsStyleBottom:
59 | {
60 | imageEdgeInsets = UIEdgeInsetsMake(0, 0, -labelHeight-space/2.0, -labelWidth);
61 | labelEdgeInsets = UIEdgeInsetsMake(-imageHeight-space/2.0, -imageWith, 0, 0);
62 | }
63 | break;
64 | case MKButtonEdgeInsetsStyleRight:
65 | {
66 | imageEdgeInsets = UIEdgeInsetsMake(0, labelWidth+space/2.0, 0, -labelWidth-space/2.0);
67 | labelEdgeInsets = UIEdgeInsetsMake(0, -imageWith-space/2.0, 0, imageWith+space/2.0);
68 | }
69 | break;
70 | default:
71 | break;
72 | }
73 |
74 | // 4. 赋值
75 | self.titleEdgeInsets = labelEdgeInsets;
76 | self.imageEdgeInsets = imageEdgeInsets;
77 | }
78 |
79 | @end
80 |
--------------------------------------------------------------------------------
/STNavBar/controller/HomePageViewController.m:
--------------------------------------------------------------------------------
1 | //
2 | // HomePageViewController.m
3 | // STNavBar
4 | //
5 | // Created by StriEver on 16/8/5.
6 | // Copyright © 2016年 StriEver. All rights reserved.
7 | //
8 |
9 | #import "HomePageViewController.h"
10 | #import "AdView.h"
11 | #import "NavBarSliderTool.h"
12 | #import "DetailViewController.h"
13 | @interface HomePageViewController ()
14 | @property (nonatomic, strong) UITableView * tableView;
15 | @property (nonatomic, strong) UIView * navBarBgView;
16 | @property (nonatomic, strong)NavBarSliderTool * sliderTool;
17 | @property (nonatomic, strong)UIScrollView * titleView;
18 | @end
19 |
20 | @implementation HomePageViewController
21 | - (void)dealloc{
22 |
23 | }
24 | - (void)viewDidLoad {
25 | [super viewDidLoad];
26 |
27 | UIButton * button = [UIButton buttonWithType:UIButtonTypeCustom];
28 | [button setBackgroundImage:[UIImage imageNamed:@"but_Photograph_press"] forState:UIControlStateNormal];
29 | button.frame = CGRectMake(0, 0, 25, 25);
30 | self.navigationItem.rightBarButtonItem = [[UIBarButtonItem alloc]initWithCustomView:button];
31 |
32 | self.view.backgroundColor = [UIColor brownColor];
33 |
34 | self.tableView = [[UITableView alloc]initWithFrame:CGRectMake(0, 0, kUIScreenWidth, kUIScreenHeight) style:UITableViewStylePlain];
35 | self.tableView.delegate = self;
36 | self.tableView.dataSource = self;
37 | self.automaticallyAdjustsScrollViewInsets = NO;
38 | self.tableView.contentInset = UIEdgeInsetsMake(0, 0, 49, 0);
39 | [self.tableView registerClass:[UITableViewCell class] forCellReuseIdentifier:@"cell"];
40 | [self.view addSubview:self.tableView];
41 | AdView * adView = [AdView adScrollViewWithFrame:CGRectMake(0, 0, 375, 200) imageLinkURL:@[@"0-0.jpg",@"0-1.jpg",@"0-4.jpg",@"0-3.jpg"] placeHoderImageName:nil pageControlShowStyle:UIPageControlShowStyleCenter];
42 | self.tableView.tableHeaderView = adView;
43 | _sliderTool = [[NavBarSliderTool alloc]init];
44 | _sliderTool.barColor = [UIColor redColor];
45 |
46 |
47 |
48 |
49 | // Do any additional setup after loading the view.
50 | }
51 | - (void)viewWillAppear:(BOOL)animated{
52 | [_sliderTool setViewController:self scrollview:self.tableView];
53 | }
54 | - (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section{
55 | return 50;
56 | }
57 | - (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath{
58 | UITableViewCell * cell = [tableView dequeueReusableCellWithIdentifier:@"cell"];
59 | if (!cell) {
60 | cell = [[UITableViewCell alloc]initWithStyle:UITableViewCellStyleDefault reuseIdentifier:@"cell"];
61 | }
62 | cell.textLabel.text = [NSString stringWithFormat:@"%d",indexPath.row];
63 | return cell;
64 | }
65 | - (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath{
66 | self.hidesBottomBarWhenPushed = YES;
67 | [self.navigationController pushViewController:[DetailViewController new] animated:YES];
68 | self.hidesBottomBarWhenPushed = NO;
69 | }
70 | @end
71 |
--------------------------------------------------------------------------------
/STNavBar/3rd/AdView.h:
--------------------------------------------------------------------------------
1 | //
2 | // AdView.h
3 | // 广告循环滚动效果
4 | //
5 | // Created by QzydeMac on 14/12/24.
6 | // Copyright (c) 2014年 Qzy. All rights reserved.
7 | //
8 |
9 | #import
10 | typedef NS_ENUM(NSUInteger, UIPageControlShowStyle)
11 | {
12 | /**
13 | * @author ZY, 15-04-26
14 | *
15 | * 不显示PageControl
16 | */
17 | UIPageControlShowStyleNone,//default
18 | UIPageControlShowStyleLeft,
19 | UIPageControlShowStyleCenter,
20 | UIPageControlShowStyleRight,
21 | };
22 |
23 | typedef NS_ENUM(NSUInteger, AdTitleShowStyle)
24 | {
25 | /**
26 | * @author ZY, 15-04-26
27 | *
28 | * 不显示标题
29 | */
30 | AdTitleShowStyleNone,
31 | AdTitleShowStyleLeft,
32 | AdTitleShowStyleCenter,
33 | AdTitleShowStyleRight,
34 | };
35 |
36 | @interface AdView : UIView
37 | {
38 | UILabel * _centerAdLabel;
39 | CGFloat _adMoveTime;
40 | }
41 |
42 | /**
43 | * @author ZY, 15-04-26
44 | *
45 | * @brief 这个计时器需要特殊处理,否则会照成内存泄露
46 | */
47 | @property (assign, nonatomic) NSTimer *moveTimer;
48 | @property (retain,nonatomic,readonly) UIScrollView * adScrollView;
49 | @property (retain,nonatomic,readonly) UIPageControl * pageControl;
50 | @property (retain,nonatomic,readonly) NSArray * imageLinkURL;
51 | @property (retain,nonatomic,readonly) NSArray * adTitleArray;
52 | /**
53 | * @author ZY, 15-05-17
54 | *
55 | * 设置page显示位置
56 | */
57 | @property (assign,nonatomic) UIPageControlShowStyle PageControlShowStyle;
58 | /**
59 | * @author ZY, 15-05-17
60 | *
61 | * 设置标题对应的位置
62 | */
63 | @property (assign,nonatomic,readonly) AdTitleShowStyle adTitleStyle;
64 |
65 | /**
66 | * @author ZY, 15-05-17
67 | *
68 | * 设置占位图片
69 | */
70 | @property (nonatomic,strong) UIImage * placeHoldImage;
71 |
72 | /**
73 | * @author ZY, 15-05-17
74 | *
75 | * 是否需要定时循环滚动
76 | */
77 | @property (nonatomic,assign) BOOL isNeedCycleRoll;
78 |
79 |
80 |
81 | /**
82 | * @author ZY, 15-04-26
83 | *
84 | * @brief 图片移动计时器
85 | */
86 | @property (nonatomic,assign) CGFloat adMoveTime;
87 | /**
88 | * @author ZY, 15-04-26
89 | *
90 | * @brief 在这里修改Label的一些属性
91 | */
92 | @property (nonatomic,strong,readonly) UILabel * centerAdLabel;
93 |
94 | /**
95 | * @author ZY, 15-04-26
96 | *
97 | * @brief 给图片创建点击后的回调方法
98 | */
99 | @property (nonatomic,strong) void (^callBack)(NSInteger index,NSString * imageURL);
100 |
101 | /**
102 | * @author ZY, 15-04-26
103 | *
104 | * @brief 设置每个图片下方的标题
105 | *
106 | * @param adTitleArray 标题数组
107 | * @param adTitleStyle 标题显示风格
108 | */
109 | - (void)setAdTitleArray:(NSArray *)adTitleArray withShowStyle:(AdTitleShowStyle)adTitleStyle;
110 |
111 | /**
112 | * @author ZY, 15-04-26
113 | *
114 | * @brief 创建AdView对象
115 | *
116 | * @param frame 设置Frame
117 | * @param imageLinkURL 图片链接地址数组,数组的每一项均为字符串
118 | * @param PageControlShowStyle PageControl显示位置
119 | * @param object 控件在那个类文件中
120 | * @return 广告视图
121 | */
122 | + (id)adScrollViewWithFrame:(CGRect)frame imageLinkURL:(NSArray *)imageLinkURL pageControlShowStyle:(UIPageControlShowStyle)PageControlShowStyle;
123 |
124 | + (id)adScrollViewWithFrame:(CGRect)frame imageLinkURL:(NSArray *)imageLinkURL placeHoderImageName:(NSString *)imageName pageControlShowStyle:(UIPageControlShowStyle)PageControlShowStyle;
125 | @end
126 |
--------------------------------------------------------------------------------
/STNavBar.xcodeproj/xcuserdata/StriEver.xcuserdatad/xcschemes/STNavBar.xcscheme:
--------------------------------------------------------------------------------
1 |
2 |
5 |
8 |
9 |
15 |
21 |
22 |
23 |
24 |
25 |
30 |
31 |
32 |
33 |
39 |
40 |
41 |
42 |
43 |
44 |
54 |
56 |
62 |
63 |
64 |
65 |
66 |
67 |
73 |
75 |
81 |
82 |
83 |
84 |
86 |
87 |
90 |
91 |
92 |
--------------------------------------------------------------------------------
/STNavBar/AppDelegate.m:
--------------------------------------------------------------------------------
1 | //
2 | // AppDelegate.m
3 | // STNavBar
4 | //
5 | // Created by StriEver on 16/8/5.
6 | // Copyright © 2016年 StriEver. All rights reserved.
7 | //
8 |
9 | #import "AppDelegate.h"
10 | #import "ViewController.h"
11 | #import "HomePageViewController.h"
12 | @interface AppDelegate ()
13 |
14 | @end
15 |
16 | @implementation AppDelegate
17 |
18 |
19 | - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions {
20 | self.window = [[UIWindow alloc] initWithFrame:[[UIScreen mainScreen] bounds]];
21 | self.window.backgroundColor = [UIColor whiteColor];
22 |
23 | //a.初始化一个tabBar控制器
24 | UITabBarController *tb=[[UITabBarController alloc]init];
25 | //设置控制器为Window的根控制器
26 | self.window.rootViewController=tb;
27 |
28 | //b.创建子控制器
29 | HomePageViewController * v1 = [[HomePageViewController alloc]init];
30 | UIViewController * v2 = [[UIViewController alloc]init];
31 | UIViewController * v3 = [[UIViewController alloc]init];
32 | UIViewController * v4 = [[UIViewController alloc]init];
33 |
34 | UINavigationController *c1=[[UINavigationController alloc]initWithRootViewController:v1];
35 | c1.view.backgroundColor=[UIColor grayColor];
36 | c1.tabBarItem.title=@"消息";
37 | c1.tabBarItem.image=[UIImage imageNamed:@"tab_recent_nor"];
38 | c1.tabBarItem.badgeValue=@"123";
39 |
40 | UINavigationController *c2=[[UINavigationController alloc]initWithRootViewController:v2];
41 | c2.view.backgroundColor=[UIColor brownColor];
42 | c2.tabBarItem.title=@"联系人";
43 | c2.tabBarItem.image=[UIImage imageNamed:@"tab_buddy_nor"];
44 |
45 | UINavigationController *c3=[[UINavigationController alloc]initWithRootViewController:v3];
46 | c3.tabBarItem.title=@"动态";
47 | c3.tabBarItem.image=[UIImage imageNamed:@"tab_qworld_nor"];
48 |
49 | UINavigationController *c4=[[UINavigationController alloc]initWithRootViewController:v4];
50 | c4.tabBarItem.title=@"设置";
51 | c4.tabBarItem.image=[UIImage imageNamed:@"tab_me_nor"];
52 |
53 |
54 |
55 | //c.添加子控制器到ITabBarController中
56 | //c.1第一种方式
57 | // [tb addChildViewController:c1];
58 | // [tb addChildViewController:c2];
59 |
60 | //c.2第二种方式
61 | tb.viewControllers=@[c1,c2,c3,c4];
62 | self.window.rootViewController = tb;
63 | [self.window makeKeyAndVisible];
64 | return YES;
65 | }
66 |
67 | - (void)applicationWillResignActive:(UIApplication *)application {
68 | // Sent when the application is about to move from active to inactive state. This can occur for certain types of temporary interruptions (such as an incoming phone call or SMS message) or when the user quits the application and it begins the transition to the background state.
69 | // Use this method to pause ongoing tasks, disable timers, and throttle down OpenGL ES frame rates. Games should use this method to pause the game.
70 | }
71 |
72 | - (void)applicationDidEnterBackground:(UIApplication *)application {
73 | // Use this method to release shared resources, save user data, invalidate timers, and store enough application state information to restore your application to its current state in case it is terminated later.
74 | // If your application supports background execution, this method is called instead of applicationWillTerminate: when the user quits.
75 | }
76 |
77 | - (void)applicationWillEnterForeground:(UIApplication *)application {
78 | // Called as part of the transition from the background to the inactive state; here you can undo many of the changes made on entering the background.
79 | }
80 |
81 | - (void)applicationDidBecomeActive:(UIApplication *)application {
82 | // Restart any tasks that were paused (or not yet started) while the application was inactive. If the application was previously in the background, optionally refresh the user interface.
83 | }
84 |
85 | - (void)applicationWillTerminate:(UIApplication *)application {
86 | // Called when the application is about to terminate. Save data if appropriate. See also applicationDidEnterBackground:.
87 | }
88 |
89 | @end
90 |
--------------------------------------------------------------------------------
/STNavBar/view/HeaderView/BottomTableViewHeaderView.xib:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
19 |
23 |
30 |
31 |
32 |
33 |
34 |
35 |
36 |
37 |
38 |
39 |
40 |
41 |
42 |
43 |
44 |
45 |
46 |
47 |
48 |
49 |
50 |
51 |
52 |
53 |
54 |
55 |
--------------------------------------------------------------------------------
/STNavBar/view/Cell/StTableViewCell.xib:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
30 |
31 |
37 |
43 |
49 |
55 |
56 |
57 |
58 |
59 |
60 |
61 |
62 |
63 |
64 |
65 |
66 |
67 |
68 |
69 |
70 |
71 |
72 |
73 |
74 |
75 |
76 |
77 |
78 |
79 |
80 |
81 |
82 |
83 |
84 |
85 |
86 |
87 |
88 |
89 |
90 |
--------------------------------------------------------------------------------
/STNavBar/3rd/AdView.m:
--------------------------------------------------------------------------------
1 | //
2 | // AdView.m
3 | // 广告循环滚动效果
4 | //
5 | // Created by QzydeMac on 14/12/24.
6 | // Copyright (c) 2014年 Qzy. All rights reserved.
7 | //
8 |
9 | //
10 | // AdScrollView.m
11 | // 广告循环滚动效果
12 | //
13 | // Created by QzydeMac on 14/12/20.
14 | // Copyright (c) 2014年 Qzy. All rights reserved.
15 | //
16 |
17 | #import "AdView.h"
18 | //#import "UIImageView+AFNetworking.h"
19 | //广告的宽度
20 | #define kAdViewWidth _adScrollView.bounds.size.width
21 | //广告的高度
22 | #define kAdViewHeight _adScrollView.bounds.size.height
23 | //由于_pageControl是添加进父视图的,所以实际位置要参考,滚动视图的y坐标
24 | #define HIGHT _adScrollView.bounds.origin.y
25 |
26 | @interface AdView ()
27 | {
28 | //广告的label
29 | // UILabel * _adLabel;
30 | //循环滚动的三个视图
31 | UIImageView * _leftImageView;
32 | UIImageView * _centerImageView;
33 | UIImageView * _rightImageView;
34 | //循环滚动的周期时间
35 |
36 | //用于确定滚动式由人导致的还是计时器到了,系统帮我们滚动的,YES,则为系统滚动,NO则为客户滚动(ps.在客户端中客户滚动一个广告后,这个广告的计时器要归0并重新计时)
37 | BOOL _isTimeUp;
38 | //为每一个图片添加一个广告语(可选)
39 | // UILabel * _leftAdLabel;
40 |
41 | // UILabel * _rightAdLabel;
42 | }
43 |
44 | @property (nonatomic,assign) NSUInteger centerImageIndex;
45 | @property (nonatomic,assign) NSUInteger leftImageIndex;
46 | @property (nonatomic,assign) NSUInteger rightImageIndex;
47 |
48 | @property (retain,nonatomic,readonly) UIImageView * leftImageView;
49 | @property (retain,nonatomic,readonly) UIImageView * centerImageView;
50 | @property (retain,nonatomic,readonly) UIImageView * rightImageView;
51 | @end
52 |
53 | @implementation AdView
54 | @synthesize centerImageIndex;
55 | @synthesize rightImageIndex;
56 | @synthesize leftImageIndex;
57 | @synthesize moveTimer;
58 |
59 | #pragma mark - 自由指定广告所占的frame
60 | - (instancetype)initWithFrame:(CGRect)frame
61 | {
62 | self = [super initWithFrame:frame];
63 | if (self) {
64 |
65 | //默认滚动式3.0s
66 | _adMoveTime = 3.0;
67 | _adScrollView = [[UIScrollView alloc]initWithFrame:self.bounds];
68 | _adScrollView.bounces = NO;
69 | _adScrollView.showsHorizontalScrollIndicator = NO;
70 | _adScrollView.showsVerticalScrollIndicator = NO;
71 | _adScrollView.pagingEnabled = YES;
72 | _adScrollView.contentOffset = CGPointMake(kAdViewWidth, 0);
73 | _adScrollView.contentSize = CGSizeMake(kAdViewWidth * 3, kAdViewHeight);
74 | _adScrollView.delegate = self;
75 | //该句是否执行会影响pageControl的位置,如果该应用上面有导航栏,就是用该句,否则注释掉即可
76 | _adScrollView.contentInset = UIEdgeInsetsMake(0, 0, 0, 0);
77 |
78 | _leftImageView = [[UIImageView alloc]initWithFrame:CGRectMake(0, 0, kAdViewWidth, kAdViewHeight)];
79 | [_adScrollView addSubview:_leftImageView];
80 |
81 |
82 | _centerImageView = [[UIImageView alloc]initWithFrame:CGRectMake(kAdViewWidth, 0, kAdViewWidth, kAdViewHeight)];
83 | _centerImageView.userInteractionEnabled = YES;
84 |
85 | [_centerImageView addGestureRecognizer:[[UITapGestureRecognizer alloc] initWithTarget:self action:@selector(tap)]];
86 |
87 | [_adScrollView addSubview:_centerImageView];
88 |
89 |
90 | _rightImageView = [[UIImageView alloc]initWithFrame:CGRectMake(kAdViewWidth*2, 0, kAdViewWidth, kAdViewHeight)];
91 | [_adScrollView addSubview:_rightImageView];
92 |
93 | _adScrollView.backgroundColor = [UIColor whiteColor];
94 | _isNeedCycleRoll = YES;
95 | [self addSubview:_adScrollView];
96 | }
97 | return self;
98 | }
99 |
100 | //这个方法会在子视图添加到父视图或者离开父视图时调用
101 | - (void)willMoveToSuperview:(UIView *)newSuperview
102 | {
103 | //解决当父View释放时,当前视图因为被Timer强引用而不能释放的问题
104 | if (!newSuperview)
105 | {
106 | [self.moveTimer invalidate];
107 | self.moveTimer = nil;
108 | }
109 | else
110 | {
111 | [self setUpTime];
112 | }
113 | }
114 |
115 | - (void)setUpTime
116 | {
117 | if (_isNeedCycleRoll && _imageLinkURL.count >= 2)
118 | {
119 | moveTimer = [NSTimer scheduledTimerWithTimeInterval:_adMoveTime target:self selector:@selector(animalMoveImage:) userInfo:nil repeats:YES];
120 | _isTimeUp = NO;
121 | }
122 | }
123 |
124 | - (void)setIsNeedCycleRoll:(BOOL)isNeedCycleRoll
125 | {
126 | _isNeedCycleRoll = isNeedCycleRoll;
127 | if (!_isNeedCycleRoll || _imageLinkURL.count < 2)
128 | {
129 | [moveTimer invalidate];
130 | moveTimer = nil;
131 | }
132 | }
133 |
134 | + (id)adScrollViewWithFrame:(CGRect)frame imageLinkURL:(NSArray *)imageLinkURL pageControlShowStyle:(UIPageControlShowStyle)PageControlShowStyle
135 | {
136 | AdView * adView = [AdView adScrollViewWithFrame:frame imageLinkURL:imageLinkURL placeHoderImageName:nil pageControlShowStyle:PageControlShowStyle];
137 | return adView;
138 | }
139 |
140 | + (id)adScrollViewWithFrame:(CGRect)frame imageLinkURL:(NSArray *)imageLinkURL placeHoderImageName:(NSString *)imageName pageControlShowStyle:(UIPageControlShowStyle)PageControlShowStyle
141 | {
142 |
143 | AdView * adView = [[AdView alloc]initWithFrame:frame];
144 | adView.placeHoldImage = [UIImage imageNamed:imageName];
145 | [adView setimageLinkURL:imageLinkURL];
146 | [adView setPageControlShowStyle:PageControlShowStyle];
147 | return adView;
148 | }
149 |
150 | #pragma mark - 设置广告所使用的图片(名字)
151 | - (void)setimageLinkURL:(NSArray *)imageLinkURL
152 | {
153 | _imageLinkURL = imageLinkURL;
154 |
155 | leftImageIndex = imageLinkURL.count-1;
156 | centerImageIndex = 0;
157 | rightImageIndex = 1;
158 |
159 | _leftImageView.image = [UIImage imageNamed:imageLinkURL[leftImageIndex]];
160 | _centerImageView.image = [UIImage imageNamed:imageLinkURL[centerImageIndex]];
161 | _rightImageView.image = [UIImage imageNamed:imageLinkURL[rightImageIndex]];
162 | }
163 |
164 | #pragma mark - 设置每个对应广告对应的广告语
165 | - (void)setAdTitleArray:(NSArray *)adTitleArray withShowStyle:(AdTitleShowStyle)adTitleStyle
166 | {
167 | _adTitleArray = adTitleArray;
168 |
169 | if(adTitleStyle == AdTitleShowStyleNone)
170 | {
171 | return;
172 | }
173 |
174 | //上面的灰色遮罩
175 | UIView *vv = [[UIView alloc] initWithFrame:CGRectMake(0, kAdViewHeight - 30, kAdViewWidth, 30)];
176 | vv.backgroundColor = [UIColor blackColor];
177 | vv.alpha = 0.3;
178 | [self addSubview:vv];
179 |
180 | [self bringSubviewToFront:_pageControl];
181 | //上面的标题
182 | _centerAdLabel = [[UILabel alloc]init];
183 | _centerAdLabel.backgroundColor = [UIColor clearColor];
184 | _centerAdLabel.frame = CGRectMake(0, kAdViewHeight - 30, kAdViewWidth-20, 30);
185 | _centerAdLabel.textColor = [UIColor whiteColor];
186 | _centerAdLabel.font = [UIFont boldSystemFontOfSize:15];
187 | [self addSubview:_centerAdLabel];
188 |
189 | if (adTitleStyle == AdTitleShowStyleLeft) {
190 | _centerAdLabel.textAlignment = NSTextAlignmentLeft;
191 | }
192 | else if (adTitleStyle == AdTitleShowStyleCenter)
193 | {
194 | _centerAdLabel.textAlignment = NSTextAlignmentCenter;
195 | }
196 | else
197 | {
198 | _centerAdLabel.textAlignment = NSTextAlignmentRight;
199 | }
200 |
201 | _centerAdLabel.text = _adTitleArray[centerImageIndex];
202 | }
203 |
204 |
205 | #pragma mark - 创建pageControl,指定其显示样式
206 | - (void)setPageControlShowStyle:(UIPageControlShowStyle)PageControlShowStyle
207 | {
208 | if (PageControlShowStyle == UIPageControlShowStyleNone || _imageLinkURL.count < 2) {
209 | return;
210 | }
211 | _pageControl = [[UIPageControl alloc]init];
212 | _pageControl.currentPageIndicatorTintColor = [UIColor redColor];
213 | _pageControl.pageIndicatorTintColor = [UIColor whiteColor];
214 | _pageControl.numberOfPages = _imageLinkURL.count;
215 |
216 | if (PageControlShowStyle == UIPageControlShowStyleLeft)
217 | {
218 | _pageControl.frame = CGRectMake(0, kAdViewHeight - 20, 20*_pageControl.numberOfPages, 20);
219 |
220 | }
221 | else if (PageControlShowStyle == UIPageControlShowStyleCenter)
222 | {
223 | _pageControl.frame = CGRectMake(0, 0, 20*_pageControl.numberOfPages, 20);
224 | _pageControl.center = CGPointMake(kAdViewWidth/2.0, kAdViewHeight - 10);
225 | }
226 | else
227 | {
228 | _pageControl.frame = CGRectMake( kAdViewWidth - 20*_pageControl.numberOfPages, kAdViewHeight - 40, 20*_pageControl.numberOfPages, 20);
229 | }
230 | _pageControl.currentPage = 0;
231 |
232 | _pageControl.enabled = NO;
233 |
234 | [self addSubview:_pageControl];
235 | }
236 |
237 | #pragma mark - 计时器到时,系统滚动图片
238 | - (void)animalMoveImage:(NSTimer *)time
239 | {
240 | [_adScrollView setContentOffset:CGPointMake(kAdViewWidth * 2, 0) animated:YES];
241 | _isTimeUp = YES;
242 |
243 | [NSTimer scheduledTimerWithTimeInterval:0.4f target:self selector:@selector(scrollViewDidEndDecelerating:) userInfo:nil repeats:NO];
244 | }
245 |
246 | #pragma mark - 图片停止时,调用该函数使得滚动视图复用
247 | - (void)scrollViewDidEndDecelerating:(UIScrollView *)scrollView
248 | {
249 | if (_adScrollView.contentOffset.x == 0)
250 | {
251 | centerImageIndex = centerImageIndex - 1;
252 | leftImageIndex = leftImageIndex - 1;
253 | rightImageIndex = rightImageIndex - 1;
254 |
255 | if (leftImageIndex == -1) {
256 | leftImageIndex = _imageLinkURL.count-1;
257 | }
258 | if (centerImageIndex == -1)
259 | {
260 | centerImageIndex = _imageLinkURL.count-1;
261 | }
262 | if (rightImageIndex == -1)
263 | {
264 | rightImageIndex = _imageLinkURL.count-1;
265 | }
266 | }
267 | else if(_adScrollView.contentOffset.x == kAdViewWidth * 2)
268 | {
269 | centerImageIndex = centerImageIndex + 1;
270 | leftImageIndex = leftImageIndex + 1;
271 | rightImageIndex = rightImageIndex + 1;
272 |
273 | if (leftImageIndex == _imageLinkURL.count) {
274 | leftImageIndex = 0;
275 | }
276 | if (centerImageIndex == _imageLinkURL.count)
277 | {
278 | centerImageIndex = 0;
279 | }
280 | if (rightImageIndex == _imageLinkURL.count)
281 | {
282 | rightImageIndex = 0;
283 | }
284 | }
285 | else
286 | {
287 | return;
288 | }
289 |
290 | [_leftImageView setImage:[UIImage imageNamed:_imageLinkURL[leftImageIndex]]];
291 | [_centerImageView setImage:[UIImage imageNamed:_imageLinkURL[centerImageIndex]]];
292 | [_rightImageView setImage:[UIImage imageNamed:_imageLinkURL[rightImageIndex]]];
293 |
294 | // [_centerImageView sd_setImageWithURL:[NSURL URLWithString:_imageLinkURL[centerImageIndex]] placeholderImage:self.placeHoldImage];
295 | //
296 | // [_rightImageView sd_setImageWithURL:[NSURL URLWithString:_imageLinkURL[rightImageIndex]] placeholderImage:self.placeHoldImage];
297 |
298 | _pageControl.currentPage = centerImageIndex;
299 |
300 | //有时候只有在右广告标签的时候才需要加载
301 | if (_adTitleArray)
302 | {
303 | if (centerImageIndex<=_adTitleArray.count-1)
304 | {
305 | _centerAdLabel.text = _adTitleArray[centerImageIndex];
306 | }
307 | }
308 | _adScrollView.contentOffset = CGPointMake(kAdViewWidth, 0);
309 |
310 | //手动控制图片滚动应该取消那个三秒的计时器
311 | if (!_isTimeUp) {
312 | [moveTimer setFireDate:[NSDate dateWithTimeIntervalSinceNow:_adMoveTime]];
313 | }
314 | _isTimeUp = NO;
315 | }
316 |
317 | - (void)scrollViewWillBeginDragging:(UIScrollView *)scrollView
318 | {
319 | [moveTimer invalidate];
320 | moveTimer = nil;
321 | }
322 |
323 | - (void)scrollViewDidEndDragging:(UIScrollView *)scrollView willDecelerate:(BOOL)decelerate
324 | {
325 | [self setUpTime];
326 | }
327 |
328 | /**
329 | * @author ZY, 15-04-26
330 | *
331 | * @brief 当前显示的图片被点击
332 | */
333 | -(void)tap
334 | {
335 | if (_callBack) {
336 | _callBack(centerImageIndex,_imageLinkURL[centerImageIndex]);
337 | }
338 | }
339 |
340 | //-(void)scrollViewDidScroll:(UIScrollView *)scrollView
341 | //{
342 | // if (self.imageCount<2) {
343 | // scrollView.contentOffset=CGPointMake(0, 0);
344 | // }
345 | //}
346 |
347 | @end
348 |
--------------------------------------------------------------------------------
/STNavBar/controller/DetailViewController.m:
--------------------------------------------------------------------------------
1 | //
2 | // DetailViewController.m
3 | // STNavBar
4 | //
5 | // Created by StriEver on 16/8/8.
6 | // Copyright © 2016年 StriEver. All rights reserved.
7 | //
8 |
9 | #import "DetailViewController.h"
10 | #import "DetailHeaderView.h"
11 | #import "AdView.h"
12 | #import "BottomTableViewHeaderView.h"
13 | #import "BottomBlurView.h"
14 | #import "StTableViewCell.h"
15 | #import "BottomSectionHeaderView.h"
16 | @interface DetailViewController (){
17 | BOOL _isWebShow;
18 | //是否隐藏NavBar
19 | BOOL _isHidenNavBar;
20 | CGFloat _lastContentsetY;
21 | }
22 | @property (nonatomic, strong) DetailHeaderView * headerView;
23 | @property (nonatomic, strong) UITableView * tableView;
24 |
25 | @property (nonatomic, strong) UITableView * bottomTableView;
26 | @property (nonatomic, strong) BottomBlurView * blurView;
27 | @property (nonatomic, strong) BottomTableViewHeaderView * bottomTableViewheaderView;
28 | @property (nonatomic, strong)UIScrollView * titleView;
29 | @property (nonatomic, strong)NSMutableArray * btnArray;
30 | @property (nonatomic, strong) UIView * lineView;
31 | @property (nonatomic, strong) UIWebView * webView;
32 | @property (nonatomic, strong) UIView * navView ;
33 | @end
34 | static NSString * const urlString = @"https://detail.m.tmall.com/item.htm?spm=a220m.6910245.0.0.jfDvSY&id=532668401051&skuId=4611686551095788955&pic=//img.alicdn.com/bao/uploaded/i4/1795616675/TB2mtFipVXXXXarXXXXXXXXXXXX-1795616675.jpg_250x250Q30.jpg&itemTitle=%E3%80%90%E6%98%93%E6%9E%9C%E7%94%9F%E9%B2%9C%E3%80%91%E7%BE%8E%E5%9B%BD%E5%8D%8E%E7%9B%9B%E9%A1%BF%E6%A8%B1%E6%A1%832kg%20%E6%9E%9C%E5%BE%84%E7%BA%A626.5mm%20%E8%BD%A6%E5%8E%98%E5%AD%90&price=156.00&from=h5";
35 | static NSString * const cellID = @"StTableViewCell";
36 | @implementation DetailViewController
37 | - (void)dealloc{
38 | NSLog(@"DetailViewController释放啦");
39 | [self.webView loadHTMLString:@"" baseURL:nil];
40 | [self.webView stopLoading];
41 | self.webView.delegate = nil;
42 | [self.webView removeFromSuperview];
43 | }
44 | - (void)viewDidLoad {
45 | [super viewDidLoad];
46 | //导航栏黑线
47 | self.view.backgroundColor = [UIColor colorWithRed:246/255.0 green:246/255.0 blue:246/255.0 alpha:1];
48 | self.navigationController.navigationBar.clipsToBounds = NO;
49 | self.automaticallyAdjustsScrollViewInsets = NO;
50 | self.tableView.contentInset = UIEdgeInsetsMake(64, 0, 0, 0);
51 | self.headerView = (DetailHeaderView *)[DetailHeaderView view];
52 | self.tableView.tableHeaderView = self.headerView;
53 | self.tableView.backgroundColor = [UIColor clearColor];
54 | _bottomTableViewheaderView = [BottomTableViewHeaderView view];
55 | self.bottomTableView.tableHeaderView = _bottomTableViewheaderView;
56 | [self blurView];
57 | __weak typeof(self) weakSelf = self;
58 | _blurView.viewTouchEvent = ^(){
59 | __strong typeof(weakSelf) strongSelf = weakSelf;
60 | [strongSelf setTableViewFrameWithType:0];
61 | strongSelf.bottomTableView.contentOffset = CGPointZero;
62 | strongSelf.bottomTableView.hidden = YES;
63 | };
64 | [self setNavTitleView];
65 | [self webView];
66 | [self setScrollViewAdview];
67 |
68 | //导航条
69 | _navView = [[UIView alloc]initWithFrame:CGRectMake(0, 0, kUIScreenWidth, 64)];
70 | _navView.backgroundColor = [UIColor whiteColor];
71 | [self.view insertSubview:_navView atIndex:self.view.subviews.count];
72 |
73 | UIButton * button = [UIButton buttonWithType:UIButtonTypeCustom];
74 | [button setImage:[UIImage imageNamed:@"ar_back"] forState:UIControlStateNormal];
75 | button.frame = CGRectMake(0, 0, 25, 25);
76 | [button addTarget:self action:@selector(backAction) forControlEvents:UIControlEventTouchUpInside];
77 | self.navigationItem.leftBarButtonItem = [[UIBarButtonItem alloc]initWithCustomView:button];
78 |
79 | }
80 | #pragma mark ---gettter
81 | - (UITableView *)tableView{
82 | if (!_tableView) {
83 | _tableView = [[UITableView alloc]initWithFrame:CGRectMake(0, 0, kUIScreenWidth, kUIScreenHeight) style:UITableViewStylePlain];
84 | _tableView.delegate = self;
85 | _tableView.showsVerticalScrollIndicator = NO;
86 | [self.view addSubview:_tableView];
87 | }
88 | return _tableView;
89 | }
90 | - (UIWebView *)webView{
91 | if (!_webView) {
92 | _webView = [[UIWebView alloc]initWithFrame:CGRectMake(0, kUIScreenHeight, kUIScreenWidth, kUIScreenHeight - 64)];
93 | _webView.scalesPageToFit = YES;
94 | _webView.scrollView.delegate = self;
95 | _webView.delegate = self;
96 | [_webView loadRequest:[NSURLRequest requestWithURL:[NSURL URLWithString:urlString]]];
97 | [self.view addSubview:_webView];
98 | }
99 | return _webView;
100 | }
101 | - (UITableView *)bottomTableView{
102 | if (!_bottomTableView) {
103 | _bottomTableView = [[UITableView alloc]initWithFrame:CGRectMake(0, 0, kUIScreenWidth, kUIScreenHeight - 120)style:UITableViewStylePlain];
104 | _bottomTableView.delegate = self;
105 | _bottomTableView.dataSource = self;
106 | // _bottomTableView.contentInset = UIEdgeInsetsMake(-32, 0, 0, 0);
107 | _bottomTableView.backgroundColor = [UIColor whiteColor];
108 | [_bottomTableView registerNib:[UINib nibWithNibName:@"StTableViewCell" bundle:nil] forCellReuseIdentifier:cellID];
109 | [self.view insertSubview:_bottomTableView belowSubview:self.tableView];
110 | }
111 | return _bottomTableView;
112 | }
113 | - (BottomBlurView *)blurView{
114 | if (!_blurView) {
115 | _blurView = [[BottomBlurView alloc]initWithFrame:CGRectMake(0, CGRectGetMaxY(self.bottomTableView.frame),kUIScreenWidth, 120) backImage:[UIImage imageNamed:@"0-0.jpg"]];
116 | _blurView.hidden = YES;
117 | [self.view insertSubview:_blurView belowSubview:self.tableView];
118 | }
119 | return _blurView;
120 | }
121 | - (NSMutableArray *)btnArray{
122 | if (!_btnArray) {
123 | _btnArray = @[].mutableCopy;
124 | }
125 | return _btnArray;
126 | }
127 | - (UIView *)lineView{
128 | if (!_lineView) {
129 | _lineView = [UIView new];
130 | _lineView.backgroundColor = [UIColor redColor];
131 | _lineView.frame = CGRectMake(0, 43, 50, 1);
132 | [_titleView addSubview:_lineView];
133 | }
134 | return _lineView;
135 | }
136 | #pragma mark ---UI
137 | - (void)setNavTitleView{
138 | _titleView = [[UIScrollView alloc]initWithFrame:CGRectMake(0, 0, 160, 44)];
139 | _titleView.contentSize = CGSizeMake(0, 44 * 2);
140 | self.navigationItem.titleView = _titleView;
141 | for (int i = 0; i < 3; i ++) {
142 | UIButton * button = [UIButton buttonWithType:UIButtonTypeCustom];
143 | button.frame = CGRectMake(i *(50 + 5), 0, 50, 44);
144 | [button setTitle:@[@"商品",@"详情",@"评价"][i] forState:UIControlStateNormal];
145 | [button setTitleColor:[UIColor darkGrayColor] forState:UIControlStateNormal];
146 | [_titleView addSubview:button];
147 | [button addTarget:self action:@selector(btnActions:) forControlEvents:UIControlEventTouchUpInside];
148 | [self.btnArray addObject:button];
149 | }
150 | UILabel * label = [UILabel new];
151 | label.text = @"图文详情";
152 | label.frame = CGRectMake(0, 44 + 0, 160, 44);
153 | label.textAlignment = NSTextAlignmentCenter;
154 | [_titleView addSubview:label];
155 | UIButton * btn = self.btnArray[0];
156 | [btn setTitleColor:[UIColor redColor] forState:UIControlStateNormal];
157 | self.lineView.x = btn.x;
158 | }
159 | - (void)setScrollViewAdview{
160 | AdView * adView = [AdView adScrollViewWithFrame:CGRectMake(0, 0, kUIScreenWidth,kUIScreenWidth) imageLinkURL:@[@"IMG_0691.JPG",@"IMG_0692.JPG",@"IMG_0693.JPG",@"IMG_0694.JPG",@"IMG_0695.JPG",@"IMG_0696.JPG"] placeHoderImageName:nil pageControlShowStyle:UIPageControlShowStyleCenter];
161 |
162 | [self.headerView.adBackView addSubview:adView];
163 | }
164 | - (void)btnActions:(UIButton *)btn{
165 | for (UIButton * btn in self.btnArray) {
166 | [btn setTitleColor:[UIColor darkGrayColor] forState:UIControlStateNormal];
167 | }
168 | [btn setTitleColor:[UIColor redColor] forState:UIControlStateNormal];
169 | [UIView animateWithDuration:.2 animations:^{
170 | self.lineView.x = btn.x;
171 | }];
172 |
173 | }
174 |
175 | - (void)setViewsFrame{
176 | CGRect currentWebFrame = CGRectMake(0, 64, kUIScreenWidth, kUIScreenHeight - 64);
177 | CGRect oldWebFrame = CGRectMake(0, kUIScreenHeight, kUIScreenWidth, kUIScreenHeight);
178 |
179 | CGRect oldTabViewFrame = CGRectMake(0, 0, kUIScreenWidth, kUIScreenHeight);
180 | CGRect newTableViewFrame = CGRectMake(0, -kUIScreenHeight, kUIScreenWidth, kUIScreenHeight);
181 | if (_isWebShow) {
182 | [UIView animateWithDuration:.5 animations:^{
183 | self.webView.frame = currentWebFrame;
184 | self.tableView.frame = newTableViewFrame;
185 | self.titleView.contentOffset = CGPointMake(0, 44);
186 | }];
187 | }else{
188 | [UIView animateWithDuration:.5 animations:^{
189 | self.webView.frame = oldWebFrame;
190 | self.tableView.frame = oldTabViewFrame;
191 | self.titleView.contentOffset = CGPointMake(0, 0);
192 | }];
193 | }
194 | _lineView.hidden = _isWebShow;
195 | }
196 | - (void)setTableViewFrameWithType:(NSInteger)type{
197 | //type = 0 设置frame当前屏幕 type = 1 溢出屏幕
198 | CGRect oldFrame = CGRectMake(0, 0, kUIScreenWidth, kUIScreenHeight);
199 | CGRect newFrame = CGRectMake(0, kUIScreenHeight, kUIScreenWidth, kUIScreenHeight);
200 | if (type == 1) {
201 | self.tableView.delegate = nil;
202 | self.bottomTableViewheaderView.alpha = 1;
203 | self.blurView.hidden = NO;
204 | }else{
205 | self.tableView.delegate = self;
206 | self.blurView.hidden = YES;
207 | self.navView.alpha = self.navigationController.navigationBar.alpha = 1;
208 | self.bottomTableViewheaderView.alpha = 0;
209 | }
210 | [UIView animateWithDuration:.2 animations:^{
211 | self.tableView.frame = type == 0 ? oldFrame : newFrame;
212 | }];
213 | }
214 | #pragma mark ---UIScrollViewDelegate
215 | - (void)scrollViewDidScroll:(UIScrollView *)scrollView{
216 | if (scrollView == _tableView) {
217 | [_headerView upDateBottomViewContraint:scrollView.contentOffset.y + 64];
218 | if (scrollView.contentOffset.y <= -64) {
219 | self.navView.alpha = self.navigationController.navigationBar.alpha = 1- (fabs(scrollView.contentOffset.y)- 64)/20.0;
220 | self.bottomTableView.hidden = NO;
221 | self.bottomTableViewheaderView.alpha = (fabs(scrollView.contentOffset.y) - 84)/25;
222 | }else{
223 | self.navView.alpha = self.navigationController.navigationBar.alpha = 1;
224 | self.bottomTableView.hidden = YES;
225 | }
226 |
227 | }
228 | }
229 | - (void)scrollViewDidEndDragging:(UIScrollView *)scrollView willDecelerate:(BOOL)decelerate {
230 | if (scrollView == self.webView.scrollView) {
231 | if (scrollView.contentOffset.y < -120) {
232 | _isWebShow = NO;
233 | [self setViewsFrame];
234 | }
235 | }else if (scrollView == self.tableView){
236 | NSLog(@"%f",scrollView.contentOffset.y);
237 | if (scrollView.contentOffset.y >= self.tableView.contentSize.height - kUIScreenHeight) {
238 | _isWebShow = YES;
239 | [self setViewsFrame];
240 | }
241 | if (scrollView.contentOffset.y < - 160) {
242 | [self setTableViewFrameWithType:1];
243 | }
244 | }
245 |
246 |
247 | }
248 | #pragma mark ---UITableViewDataSource
249 | - (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section{
250 | if (tableView == _bottomTableView) {
251 | return 100;
252 | }
253 | return 100;
254 | }
255 | - (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath{
256 | if (tableView == _bottomTableView) {
257 | StTableViewCell * cell = [tableView dequeueReusableCellWithIdentifier:cellID forIndexPath:indexPath];
258 | return cell;
259 | }
260 | return nil;
261 |
262 | }
263 | - (CGFloat)tableView:(UITableView *)tableView heightForRowAtIndexPath:(NSIndexPath *)indexPath{
264 | if (tableView == _bottomTableView) {
265 | return (kUIScreenWidth - 5)/2.0 + 5 + 35 + 20;
266 | }
267 | return 0;
268 | }
269 | - (UIView *)tableView:(UITableView *)tableView viewForHeaderInSection:(NSInteger)section{
270 | if (tableView == _bottomTableView) {
271 | BottomSectionHeaderView * view = [[BottomSectionHeaderView alloc]init];
272 | return view;
273 | }
274 | return nil;
275 |
276 | }
277 | - (CGFloat)tableView:(UITableView *)tableView heightForHeaderInSection:(NSInteger)section{
278 | if (tableView == _bottomTableView) {
279 | return 100;
280 | }
281 | return 0;
282 | }
283 | #pragma mark ---UIWebViewDelegate
284 | - (void)webViewDidFinishLoad:(UIWebView *)webView{
285 | // 防止内存飙升
286 | [[NSUserDefaults standardUserDefaults] setInteger:0 forKey:@"WebKitCacheModelPreferenceKey"];
287 |
288 | [[NSUserDefaults standardUserDefaults] setBool:NO forKey:@"WebKitDiskImageCacheEnabled"];
289 | [[NSUserDefaults standardUserDefaults] setBool:NO forKey:@"WebKitOfflineWebApplicationCacheEnabled"];
290 | [[NSUserDefaults standardUserDefaults] synchronize];
291 |
292 | }
293 | #pragma mark ---buttonAction
294 | - (void)backAction{
295 | [self.navigationController popViewControllerAnimated:YES];
296 | }
297 | @end
298 |
--------------------------------------------------------------------------------
/STNavBar.xcodeproj/project.pbxproj:
--------------------------------------------------------------------------------
1 | // !$*UTF8*$!
2 | {
3 | archiveVersion = 1;
4 | classes = {
5 | };
6 | objectVersion = 46;
7 | objects = {
8 |
9 | /* Begin PBXBuildFile section */
10 | D358B7D51D548730003FD81E /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = D358B7D41D548730003FD81E /* main.m */; };
11 | D358B7D81D548730003FD81E /* AppDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = D358B7D71D548730003FD81E /* AppDelegate.m */; };
12 | D358B7E01D548731003FD81E /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = D358B7DF1D548731003FD81E /* Assets.xcassets */; };
13 | D358B7E31D548731003FD81E /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = D358B7E11D548731003FD81E /* LaunchScreen.storyboard */; };
14 | D358B85C1D59EB49003FD81E /* 0-0.jpg in Resources */ = {isa = PBXBuildFile; fileRef = D358B8461D59EB49003FD81E /* 0-0.jpg */; };
15 | D358B85D1D59EB49003FD81E /* 0-1.jpg in Resources */ = {isa = PBXBuildFile; fileRef = D358B8471D59EB49003FD81E /* 0-1.jpg */; };
16 | D358B85E1D59EB49003FD81E /* 0-3.jpg in Resources */ = {isa = PBXBuildFile; fileRef = D358B8481D59EB49003FD81E /* 0-3.jpg */; };
17 | D358B85F1D59EB49003FD81E /* 0-4.jpg in Resources */ = {isa = PBXBuildFile; fileRef = D358B8491D59EB49003FD81E /* 0-4.jpg */; };
18 | D358B8601D59EB49003FD81E /* ar_back.png in Resources */ = {isa = PBXBuildFile; fileRef = D358B84A1D59EB49003FD81E /* ar_back.png */; };
19 | D358B8611D59EB49003FD81E /* but_Photograph_press@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = D358B84B1D59EB49003FD81E /* but_Photograph_press@2x.png */; };
20 | D358B8621D59EB49003FD81E /* detail_bar_bg.png in Resources */ = {isa = PBXBuildFile; fileRef = D358B84C1D59EB49003FD81E /* detail_bar_bg.png */; };
21 | D358B8631D59EB49003FD81E /* footprint@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = D358B84D1D59EB49003FD81E /* footprint@2x.png */; };
22 | D358B8641D59EB49003FD81E /* home@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = D358B84E1D59EB49003FD81E /* home@2x.png */; };
23 | D358B8651D59EB49003FD81E /* IMG_0691.JPG in Resources */ = {isa = PBXBuildFile; fileRef = D358B84F1D59EB49003FD81E /* IMG_0691.JPG */; };
24 | D358B8661D59EB49003FD81E /* IMG_0692.JPG in Resources */ = {isa = PBXBuildFile; fileRef = D358B8501D59EB49003FD81E /* IMG_0692.JPG */; };
25 | D358B8671D59EB49003FD81E /* IMG_0693.JPG in Resources */ = {isa = PBXBuildFile; fileRef = D358B8511D59EB49003FD81E /* IMG_0693.JPG */; };
26 | D358B8681D59EB49003FD81E /* IMG_0694.JPG in Resources */ = {isa = PBXBuildFile; fileRef = D358B8521D59EB49003FD81E /* IMG_0694.JPG */; };
27 | D358B8691D59EB49003FD81E /* IMG_0695.JPG in Resources */ = {isa = PBXBuildFile; fileRef = D358B8531D59EB49003FD81E /* IMG_0695.JPG */; };
28 | D358B86A1D59EB49003FD81E /* IMG_0696.JPG in Resources */ = {isa = PBXBuildFile; fileRef = D358B8541D59EB49003FD81E /* IMG_0696.JPG */; };
29 | D358B86B1D59EB49003FD81E /* IMG_0699.JPG in Resources */ = {isa = PBXBuildFile; fileRef = D358B8551D59EB49003FD81E /* IMG_0699.JPG */; };
30 | D358B86C1D59EB49003FD81E /* message_collect_small@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = D358B8561D59EB49003FD81E /* message_collect_small@2x.png */; };
31 | D358B86D1D59EB49003FD81E /* message@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = D358B8571D59EB49003FD81E /* message@2x.png */; };
32 | D358B86E1D59EB49003FD81E /* minidetail_share@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = D358B8581D59EB49003FD81E /* minidetail_share@2x.png */; };
33 | D358B86F1D59EB49003FD81E /* refresh_click@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = D358B8591D59EB49003FD81E /* refresh_click@2x.png */; };
34 | D358B8701D59EB49003FD81E /* search@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = D358B85A1D59EB49003FD81E /* search@2x.png */; };
35 | D358B8711D59EB49003FD81E /* SHJ_NoCollection@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = D358B85B1D59EB49003FD81E /* SHJ_NoCollection@2x.png */; };
36 | D358B87C1D59EB52003FD81E /* BottomBlurView.m in Sources */ = {isa = PBXBuildFile; fileRef = D358B8731D59EB52003FD81E /* BottomBlurView.m */; };
37 | D358B87D1D59EB52003FD81E /* BottomSectionHeaderView.m in Sources */ = {isa = PBXBuildFile; fileRef = D358B8751D59EB52003FD81E /* BottomSectionHeaderView.m */; };
38 | D358B87E1D59EB52003FD81E /* BottomTableViewHeaderView.m in Sources */ = {isa = PBXBuildFile; fileRef = D358B8771D59EB52003FD81E /* BottomTableViewHeaderView.m */; };
39 | D358B87F1D59EB52003FD81E /* BottomTableViewHeaderView.xib in Resources */ = {isa = PBXBuildFile; fileRef = D358B8781D59EB52003FD81E /* BottomTableViewHeaderView.xib */; };
40 | D358B8801D59EB52003FD81E /* DetailHeaderView.m in Sources */ = {isa = PBXBuildFile; fileRef = D358B87A1D59EB52003FD81E /* DetailHeaderView.m */; };
41 | D358B8811D59EB52003FD81E /* DetailHeaderView.xib in Resources */ = {isa = PBXBuildFile; fileRef = D358B87B1D59EB52003FD81E /* DetailHeaderView.xib */; };
42 | D358B8851D59EB58003FD81E /* StTableViewCell.m in Sources */ = {isa = PBXBuildFile; fileRef = D358B8831D59EB58003FD81E /* StTableViewCell.m */; };
43 | D358B8861D59EB58003FD81E /* StTableViewCell.xib in Resources */ = {isa = PBXBuildFile; fileRef = D358B8841D59EB58003FD81E /* StTableViewCell.xib */; };
44 | D358B88D1D59EB5E003FD81E /* DetailViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = D358B8881D59EB5E003FD81E /* DetailViewController.m */; };
45 | D358B88E1D59EB5E003FD81E /* HomePageViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = D358B88A1D59EB5E003FD81E /* HomePageViewController.m */; };
46 | D358B88F1D59EB5E003FD81E /* ViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = D358B88C1D59EB5E003FD81E /* ViewController.m */; };
47 | D358B8941D59EB64003FD81E /* UIButton+ImageTitleSpacing.m in Sources */ = {isa = PBXBuildFile; fileRef = D358B8911D59EB64003FD81E /* UIButton+ImageTitleSpacing.m */; };
48 | D358B8951D59EB64003FD81E /* UIView+Extension.m in Sources */ = {isa = PBXBuildFile; fileRef = D358B8931D59EB64003FD81E /* UIView+Extension.m */; };
49 | D358B8981D59EB6A003FD81E /* NavBarSliderTool.m in Sources */ = {isa = PBXBuildFile; fileRef = D358B8971D59EB6A003FD81E /* NavBarSliderTool.m */; };
50 | D358B89B1D59EB70003FD81E /* AdView.m in Sources */ = {isa = PBXBuildFile; fileRef = D358B89A1D59EB70003FD81E /* AdView.m */; };
51 | D358B8A01D59EC1E003FD81E /* 3.6__TM_02.gif in Resources */ = {isa = PBXBuildFile; fileRef = D358B89E1D59EC1E003FD81E /* 3.6__TM_02.gif */; };
52 | D358B8A11D59EC1E003FD81E /* 3.6__TM_03.gif in Resources */ = {isa = PBXBuildFile; fileRef = D358B89F1D59EC1E003FD81E /* 3.6__TM_03.gif */; };
53 | /* End PBXBuildFile section */
54 |
55 | /* Begin PBXFileReference section */
56 | D358B7D01D54872E003FD81E /* STNavBar.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = STNavBar.app; sourceTree = BUILT_PRODUCTS_DIR; };
57 | D358B7D41D548730003FD81E /* main.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = main.m; sourceTree = ""; };
58 | D358B7D61D548730003FD81E /* AppDelegate.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = AppDelegate.h; sourceTree = ""; };
59 | D358B7D71D548730003FD81E /* AppDelegate.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = AppDelegate.m; sourceTree = ""; };
60 | D358B7DF1D548731003FD81E /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = ""; };
61 | D358B7E21D548731003FD81E /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/LaunchScreen.storyboard; sourceTree = ""; };
62 | D358B7E41D548731003FD81E /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; };
63 | D358B8461D59EB49003FD81E /* 0-0.jpg */ = {isa = PBXFileReference; lastKnownFileType = image.jpeg; path = "0-0.jpg"; sourceTree = ""; };
64 | D358B8471D59EB49003FD81E /* 0-1.jpg */ = {isa = PBXFileReference; lastKnownFileType = image.jpeg; path = "0-1.jpg"; sourceTree = ""; };
65 | D358B8481D59EB49003FD81E /* 0-3.jpg */ = {isa = PBXFileReference; lastKnownFileType = image.jpeg; path = "0-3.jpg"; sourceTree = ""; };
66 | D358B8491D59EB49003FD81E /* 0-4.jpg */ = {isa = PBXFileReference; lastKnownFileType = image.jpeg; path = "0-4.jpg"; sourceTree = ""; };
67 | D358B84A1D59EB49003FD81E /* ar_back.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = ar_back.png; sourceTree = ""; };
68 | D358B84B1D59EB49003FD81E /* but_Photograph_press@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "but_Photograph_press@2x.png"; sourceTree = ""; };
69 | D358B84C1D59EB49003FD81E /* detail_bar_bg.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = detail_bar_bg.png; sourceTree = ""; };
70 | D358B84D1D59EB49003FD81E /* footprint@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "footprint@2x.png"; sourceTree = ""; };
71 | D358B84E1D59EB49003FD81E /* home@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "home@2x.png"; sourceTree = ""; };
72 | D358B84F1D59EB49003FD81E /* IMG_0691.JPG */ = {isa = PBXFileReference; lastKnownFileType = image.jpeg; path = IMG_0691.JPG; sourceTree = ""; };
73 | D358B8501D59EB49003FD81E /* IMG_0692.JPG */ = {isa = PBXFileReference; lastKnownFileType = image.jpeg; path = IMG_0692.JPG; sourceTree = ""; };
74 | D358B8511D59EB49003FD81E /* IMG_0693.JPG */ = {isa = PBXFileReference; lastKnownFileType = image.jpeg; path = IMG_0693.JPG; sourceTree = ""; };
75 | D358B8521D59EB49003FD81E /* IMG_0694.JPG */ = {isa = PBXFileReference; lastKnownFileType = image.jpeg; path = IMG_0694.JPG; sourceTree = ""; };
76 | D358B8531D59EB49003FD81E /* IMG_0695.JPG */ = {isa = PBXFileReference; lastKnownFileType = image.jpeg; path = IMG_0695.JPG; sourceTree = ""; };
77 | D358B8541D59EB49003FD81E /* IMG_0696.JPG */ = {isa = PBXFileReference; lastKnownFileType = image.jpeg; path = IMG_0696.JPG; sourceTree = ""; };
78 | D358B8551D59EB49003FD81E /* IMG_0699.JPG */ = {isa = PBXFileReference; lastKnownFileType = image.jpeg; path = IMG_0699.JPG; sourceTree = ""; };
79 | D358B8561D59EB49003FD81E /* message_collect_small@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "message_collect_small@2x.png"; sourceTree = ""; };
80 | D358B8571D59EB49003FD81E /* message@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "message@2x.png"; sourceTree = ""; };
81 | D358B8581D59EB49003FD81E /* minidetail_share@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "minidetail_share@2x.png"; sourceTree = ""; };
82 | D358B8591D59EB49003FD81E /* refresh_click@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "refresh_click@2x.png"; sourceTree = ""; };
83 | D358B85A1D59EB49003FD81E /* search@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "search@2x.png"; sourceTree = ""; };
84 | D358B85B1D59EB49003FD81E /* SHJ_NoCollection@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "SHJ_NoCollection@2x.png"; sourceTree = ""; };
85 | D358B8721D59EB52003FD81E /* BottomBlurView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = BottomBlurView.h; sourceTree = ""; };
86 | D358B8731D59EB52003FD81E /* BottomBlurView.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = BottomBlurView.m; sourceTree = ""; };
87 | D358B8741D59EB52003FD81E /* BottomSectionHeaderView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = BottomSectionHeaderView.h; sourceTree = ""; };
88 | D358B8751D59EB52003FD81E /* BottomSectionHeaderView.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = BottomSectionHeaderView.m; sourceTree = ""; };
89 | D358B8761D59EB52003FD81E /* BottomTableViewHeaderView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = BottomTableViewHeaderView.h; sourceTree = ""; };
90 | D358B8771D59EB52003FD81E /* BottomTableViewHeaderView.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = BottomTableViewHeaderView.m; sourceTree = ""; };
91 | D358B8781D59EB52003FD81E /* BottomTableViewHeaderView.xib */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.xib; path = BottomTableViewHeaderView.xib; sourceTree = ""; };
92 | D358B8791D59EB52003FD81E /* DetailHeaderView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = DetailHeaderView.h; sourceTree = ""; };
93 | D358B87A1D59EB52003FD81E /* DetailHeaderView.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = DetailHeaderView.m; sourceTree = ""; };
94 | D358B87B1D59EB52003FD81E /* DetailHeaderView.xib */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.xib; path = DetailHeaderView.xib; sourceTree = ""; };
95 | D358B8821D59EB58003FD81E /* StTableViewCell.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = StTableViewCell.h; sourceTree = ""; };
96 | D358B8831D59EB58003FD81E /* StTableViewCell.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = StTableViewCell.m; sourceTree = ""; };
97 | D358B8841D59EB58003FD81E /* StTableViewCell.xib */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.xib; path = StTableViewCell.xib; sourceTree = ""; };
98 | D358B8871D59EB5E003FD81E /* DetailViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = DetailViewController.h; sourceTree = ""; };
99 | D358B8881D59EB5E003FD81E /* DetailViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = DetailViewController.m; sourceTree = ""; };
100 | D358B8891D59EB5E003FD81E /* HomePageViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = HomePageViewController.h; sourceTree = ""; };
101 | D358B88A1D59EB5E003FD81E /* HomePageViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = HomePageViewController.m; sourceTree = ""; };
102 | D358B88B1D59EB5E003FD81E /* ViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ViewController.h; sourceTree = ""; };
103 | D358B88C1D59EB5E003FD81E /* ViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = ViewController.m; sourceTree = ""; };
104 | D358B8901D59EB64003FD81E /* UIButton+ImageTitleSpacing.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "UIButton+ImageTitleSpacing.h"; sourceTree = ""; };
105 | D358B8911D59EB64003FD81E /* UIButton+ImageTitleSpacing.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = "UIButton+ImageTitleSpacing.m"; sourceTree = ""; };
106 | D358B8921D59EB64003FD81E /* UIView+Extension.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "UIView+Extension.h"; sourceTree = ""; };
107 | D358B8931D59EB64003FD81E /* UIView+Extension.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = "UIView+Extension.m"; sourceTree = ""; };
108 | D358B8961D59EB6A003FD81E /* NavBarSliderTool.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = NavBarSliderTool.h; sourceTree = ""; };
109 | D358B8971D59EB6A003FD81E /* NavBarSliderTool.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = NavBarSliderTool.m; sourceTree = ""; };
110 | D358B8991D59EB70003FD81E /* AdView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = AdView.h; sourceTree = ""; };
111 | D358B89A1D59EB70003FD81E /* AdView.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = AdView.m; sourceTree = ""; };
112 | D358B89C1D59EBCF003FD81E /* STNavPch.pch */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = STNavPch.pch; sourceTree = ""; };
113 | D358B89E1D59EC1E003FD81E /* 3.6__TM_02.gif */ = {isa = PBXFileReference; lastKnownFileType = image.gif; path = 3.6__TM_02.gif; sourceTree = ""; };
114 | D358B89F1D59EC1E003FD81E /* 3.6__TM_03.gif */ = {isa = PBXFileReference; lastKnownFileType = image.gif; path = 3.6__TM_03.gif; sourceTree = ""; };
115 | /* End PBXFileReference section */
116 |
117 | /* Begin PBXFrameworksBuildPhase section */
118 | D358B7CD1D54872E003FD81E /* Frameworks */ = {
119 | isa = PBXFrameworksBuildPhase;
120 | buildActionMask = 2147483647;
121 | files = (
122 | );
123 | runOnlyForDeploymentPostprocessing = 0;
124 | };
125 | /* End PBXFrameworksBuildPhase section */
126 |
127 | /* Begin PBXGroup section */
128 | D358B7C71D54872E003FD81E = {
129 | isa = PBXGroup;
130 | children = (
131 | D358B7D21D548730003FD81E /* STNavBar */,
132 | D358B7D11D54872E003FD81E /* Products */,
133 | );
134 | sourceTree = "";
135 | };
136 | D358B7D11D54872E003FD81E /* Products */ = {
137 | isa = PBXGroup;
138 | children = (
139 | D358B7D01D54872E003FD81E /* STNavBar.app */,
140 | );
141 | name = Products;
142 | sourceTree = "";
143 | };
144 | D358B7D21D548730003FD81E /* STNavBar */ = {
145 | isa = PBXGroup;
146 | children = (
147 | D358B8431D59D402003FD81E /* 3rd */,
148 | D358B8421D59D3D1003FD81E /* Tool */,
149 | D358B83F1D59D3A6003FD81E /* categary */,
150 | D358B8401D59D3A6003FD81E /* controller */,
151 | D358B83E1D59D39B003FD81E /* view */,
152 | D358B7D61D548730003FD81E /* AppDelegate.h */,
153 | D358B7D71D548730003FD81E /* AppDelegate.m */,
154 | D358B7DF1D548731003FD81E /* Assets.xcassets */,
155 | D358B7E11D548731003FD81E /* LaunchScreen.storyboard */,
156 | D358B7E41D548731003FD81E /* Info.plist */,
157 | D358B7D31D548730003FD81E /* Supporting Files */,
158 | );
159 | path = STNavBar;
160 | sourceTree = "";
161 | };
162 | D358B7D31D548730003FD81E /* Supporting Files */ = {
163 | isa = PBXGroup;
164 | children = (
165 | D358B89D1D59EC1E003FD81E /* GIF */,
166 | D358B89C1D59EBCF003FD81E /* STNavPch.pch */,
167 | D358B8411D59D3A6003FD81E /* image */,
168 | D358B7D41D548730003FD81E /* main.m */,
169 | );
170 | name = "Supporting Files";
171 | sourceTree = "";
172 | };
173 | D358B83E1D59D39B003FD81E /* view */ = {
174 | isa = PBXGroup;
175 | children = (
176 | D358B8441D59D431003FD81E /* Cell */,
177 | D358B8451D59D431003FD81E /* HeaderView */,
178 | );
179 | path = view;
180 | sourceTree = "";
181 | };
182 | D358B83F1D59D3A6003FD81E /* categary */ = {
183 | isa = PBXGroup;
184 | children = (
185 | D358B8901D59EB64003FD81E /* UIButton+ImageTitleSpacing.h */,
186 | D358B8911D59EB64003FD81E /* UIButton+ImageTitleSpacing.m */,
187 | D358B8921D59EB64003FD81E /* UIView+Extension.h */,
188 | D358B8931D59EB64003FD81E /* UIView+Extension.m */,
189 | );
190 | path = categary;
191 | sourceTree = "";
192 | };
193 | D358B8401D59D3A6003FD81E /* controller */ = {
194 | isa = PBXGroup;
195 | children = (
196 | D358B8871D59EB5E003FD81E /* DetailViewController.h */,
197 | D358B8881D59EB5E003FD81E /* DetailViewController.m */,
198 | D358B8891D59EB5E003FD81E /* HomePageViewController.h */,
199 | D358B88A1D59EB5E003FD81E /* HomePageViewController.m */,
200 | D358B88B1D59EB5E003FD81E /* ViewController.h */,
201 | D358B88C1D59EB5E003FD81E /* ViewController.m */,
202 | );
203 | path = controller;
204 | sourceTree = "";
205 | };
206 | D358B8411D59D3A6003FD81E /* image */ = {
207 | isa = PBXGroup;
208 | children = (
209 | D358B8461D59EB49003FD81E /* 0-0.jpg */,
210 | D358B8471D59EB49003FD81E /* 0-1.jpg */,
211 | D358B8481D59EB49003FD81E /* 0-3.jpg */,
212 | D358B8491D59EB49003FD81E /* 0-4.jpg */,
213 | D358B84A1D59EB49003FD81E /* ar_back.png */,
214 | D358B84B1D59EB49003FD81E /* but_Photograph_press@2x.png */,
215 | D358B84C1D59EB49003FD81E /* detail_bar_bg.png */,
216 | D358B84D1D59EB49003FD81E /* footprint@2x.png */,
217 | D358B84E1D59EB49003FD81E /* home@2x.png */,
218 | D358B84F1D59EB49003FD81E /* IMG_0691.JPG */,
219 | D358B8501D59EB49003FD81E /* IMG_0692.JPG */,
220 | D358B8511D59EB49003FD81E /* IMG_0693.JPG */,
221 | D358B8521D59EB49003FD81E /* IMG_0694.JPG */,
222 | D358B8531D59EB49003FD81E /* IMG_0695.JPG */,
223 | D358B8541D59EB49003FD81E /* IMG_0696.JPG */,
224 | D358B8551D59EB49003FD81E /* IMG_0699.JPG */,
225 | D358B8561D59EB49003FD81E /* message_collect_small@2x.png */,
226 | D358B8571D59EB49003FD81E /* message@2x.png */,
227 | D358B8581D59EB49003FD81E /* minidetail_share@2x.png */,
228 | D358B8591D59EB49003FD81E /* refresh_click@2x.png */,
229 | D358B85A1D59EB49003FD81E /* search@2x.png */,
230 | D358B85B1D59EB49003FD81E /* SHJ_NoCollection@2x.png */,
231 | );
232 | path = image;
233 | sourceTree = "";
234 | };
235 | D358B8421D59D3D1003FD81E /* Tool */ = {
236 | isa = PBXGroup;
237 | children = (
238 | D358B8961D59EB6A003FD81E /* NavBarSliderTool.h */,
239 | D358B8971D59EB6A003FD81E /* NavBarSliderTool.m */,
240 | );
241 | path = Tool;
242 | sourceTree = "";
243 | };
244 | D358B8431D59D402003FD81E /* 3rd */ = {
245 | isa = PBXGroup;
246 | children = (
247 | D358B8991D59EB70003FD81E /* AdView.h */,
248 | D358B89A1D59EB70003FD81E /* AdView.m */,
249 | );
250 | path = 3rd;
251 | sourceTree = "";
252 | };
253 | D358B8441D59D431003FD81E /* Cell */ = {
254 | isa = PBXGroup;
255 | children = (
256 | D358B8821D59EB58003FD81E /* StTableViewCell.h */,
257 | D358B8831D59EB58003FD81E /* StTableViewCell.m */,
258 | D358B8841D59EB58003FD81E /* StTableViewCell.xib */,
259 | );
260 | path = Cell;
261 | sourceTree = "";
262 | };
263 | D358B8451D59D431003FD81E /* HeaderView */ = {
264 | isa = PBXGroup;
265 | children = (
266 | D358B8721D59EB52003FD81E /* BottomBlurView.h */,
267 | D358B8731D59EB52003FD81E /* BottomBlurView.m */,
268 | D358B8741D59EB52003FD81E /* BottomSectionHeaderView.h */,
269 | D358B8751D59EB52003FD81E /* BottomSectionHeaderView.m */,
270 | D358B8761D59EB52003FD81E /* BottomTableViewHeaderView.h */,
271 | D358B8771D59EB52003FD81E /* BottomTableViewHeaderView.m */,
272 | D358B8781D59EB52003FD81E /* BottomTableViewHeaderView.xib */,
273 | D358B8791D59EB52003FD81E /* DetailHeaderView.h */,
274 | D358B87A1D59EB52003FD81E /* DetailHeaderView.m */,
275 | D358B87B1D59EB52003FD81E /* DetailHeaderView.xib */,
276 | );
277 | path = HeaderView;
278 | sourceTree = "";
279 | };
280 | D358B89D1D59EC1E003FD81E /* GIF */ = {
281 | isa = PBXGroup;
282 | children = (
283 | D358B89E1D59EC1E003FD81E /* 3.6__TM_02.gif */,
284 | D358B89F1D59EC1E003FD81E /* 3.6__TM_03.gif */,
285 | );
286 | path = GIF;
287 | sourceTree = "";
288 | };
289 | /* End PBXGroup section */
290 |
291 | /* Begin PBXNativeTarget section */
292 | D358B7CF1D54872E003FD81E /* STNavBar */ = {
293 | isa = PBXNativeTarget;
294 | buildConfigurationList = D358B7E71D548731003FD81E /* Build configuration list for PBXNativeTarget "STNavBar" */;
295 | buildPhases = (
296 | D358B7CC1D54872E003FD81E /* Sources */,
297 | D358B7CD1D54872E003FD81E /* Frameworks */,
298 | D358B7CE1D54872E003FD81E /* Resources */,
299 | );
300 | buildRules = (
301 | );
302 | dependencies = (
303 | );
304 | name = STNavBar;
305 | productName = STNavBar;
306 | productReference = D358B7D01D54872E003FD81E /* STNavBar.app */;
307 | productType = "com.apple.product-type.application";
308 | };
309 | /* End PBXNativeTarget section */
310 |
311 | /* Begin PBXProject section */
312 | D358B7C81D54872E003FD81E /* Project object */ = {
313 | isa = PBXProject;
314 | attributes = {
315 | LastUpgradeCheck = 0730;
316 | ORGANIZATIONNAME = StriEver;
317 | TargetAttributes = {
318 | D358B7CF1D54872E003FD81E = {
319 | CreatedOnToolsVersion = 7.3.1;
320 | };
321 | };
322 | };
323 | buildConfigurationList = D358B7CB1D54872E003FD81E /* Build configuration list for PBXProject "STNavBar" */;
324 | compatibilityVersion = "Xcode 3.2";
325 | developmentRegion = English;
326 | hasScannedForEncodings = 0;
327 | knownRegions = (
328 | en,
329 | Base,
330 | );
331 | mainGroup = D358B7C71D54872E003FD81E;
332 | productRefGroup = D358B7D11D54872E003FD81E /* Products */;
333 | projectDirPath = "";
334 | projectRoot = "";
335 | targets = (
336 | D358B7CF1D54872E003FD81E /* STNavBar */,
337 | );
338 | };
339 | /* End PBXProject section */
340 |
341 | /* Begin PBXResourcesBuildPhase section */
342 | D358B7CE1D54872E003FD81E /* Resources */ = {
343 | isa = PBXResourcesBuildPhase;
344 | buildActionMask = 2147483647;
345 | files = (
346 | D358B85D1D59EB49003FD81E /* 0-1.jpg in Resources */,
347 | D358B85C1D59EB49003FD81E /* 0-0.jpg in Resources */,
348 | D358B8631D59EB49003FD81E /* footprint@2x.png in Resources */,
349 | D358B86E1D59EB49003FD81E /* minidetail_share@2x.png in Resources */,
350 | D358B8681D59EB49003FD81E /* IMG_0694.JPG in Resources */,
351 | D358B8671D59EB49003FD81E /* IMG_0693.JPG in Resources */,
352 | D358B8811D59EB52003FD81E /* DetailHeaderView.xib in Resources */,
353 | D358B86C1D59EB49003FD81E /* message_collect_small@2x.png in Resources */,
354 | D358B8651D59EB49003FD81E /* IMG_0691.JPG in Resources */,
355 | D358B8A01D59EC1E003FD81E /* 3.6__TM_02.gif in Resources */,
356 | D358B8611D59EB49003FD81E /* but_Photograph_press@2x.png in Resources */,
357 | D358B8711D59EB49003FD81E /* SHJ_NoCollection@2x.png in Resources */,
358 | D358B86D1D59EB49003FD81E /* message@2x.png in Resources */,
359 | D358B8621D59EB49003FD81E /* detail_bar_bg.png in Resources */,
360 | D358B86F1D59EB49003FD81E /* refresh_click@2x.png in Resources */,
361 | D358B7E31D548731003FD81E /* LaunchScreen.storyboard in Resources */,
362 | D358B86B1D59EB49003FD81E /* IMG_0699.JPG in Resources */,
363 | D358B8861D59EB58003FD81E /* StTableViewCell.xib in Resources */,
364 | D358B86A1D59EB49003FD81E /* IMG_0696.JPG in Resources */,
365 | D358B87F1D59EB52003FD81E /* BottomTableViewHeaderView.xib in Resources */,
366 | D358B85F1D59EB49003FD81E /* 0-4.jpg in Resources */,
367 | D358B85E1D59EB49003FD81E /* 0-3.jpg in Resources */,
368 | D358B8691D59EB49003FD81E /* IMG_0695.JPG in Resources */,
369 | D358B7E01D548731003FD81E /* Assets.xcassets in Resources */,
370 | D358B8661D59EB49003FD81E /* IMG_0692.JPG in Resources */,
371 | D358B8701D59EB49003FD81E /* search@2x.png in Resources */,
372 | D358B8601D59EB49003FD81E /* ar_back.png in Resources */,
373 | D358B8A11D59EC1E003FD81E /* 3.6__TM_03.gif in Resources */,
374 | D358B8641D59EB49003FD81E /* home@2x.png in Resources */,
375 | );
376 | runOnlyForDeploymentPostprocessing = 0;
377 | };
378 | /* End PBXResourcesBuildPhase section */
379 |
380 | /* Begin PBXSourcesBuildPhase section */
381 | D358B7CC1D54872E003FD81E /* Sources */ = {
382 | isa = PBXSourcesBuildPhase;
383 | buildActionMask = 2147483647;
384 | files = (
385 | D358B8941D59EB64003FD81E /* UIButton+ImageTitleSpacing.m in Sources */,
386 | D358B8801D59EB52003FD81E /* DetailHeaderView.m in Sources */,
387 | D358B8981D59EB6A003FD81E /* NavBarSliderTool.m in Sources */,
388 | D358B87C1D59EB52003FD81E /* BottomBlurView.m in Sources */,
389 | D358B88E1D59EB5E003FD81E /* HomePageViewController.m in Sources */,
390 | D358B89B1D59EB70003FD81E /* AdView.m in Sources */,
391 | D358B87E1D59EB52003FD81E /* BottomTableViewHeaderView.m in Sources */,
392 | D358B88F1D59EB5E003FD81E /* ViewController.m in Sources */,
393 | D358B8951D59EB64003FD81E /* UIView+Extension.m in Sources */,
394 | D358B88D1D59EB5E003FD81E /* DetailViewController.m in Sources */,
395 | D358B7D81D548730003FD81E /* AppDelegate.m in Sources */,
396 | D358B87D1D59EB52003FD81E /* BottomSectionHeaderView.m in Sources */,
397 | D358B8851D59EB58003FD81E /* StTableViewCell.m in Sources */,
398 | D358B7D51D548730003FD81E /* main.m in Sources */,
399 | );
400 | runOnlyForDeploymentPostprocessing = 0;
401 | };
402 | /* End PBXSourcesBuildPhase section */
403 |
404 | /* Begin PBXVariantGroup section */
405 | D358B7E11D548731003FD81E /* LaunchScreen.storyboard */ = {
406 | isa = PBXVariantGroup;
407 | children = (
408 | D358B7E21D548731003FD81E /* Base */,
409 | );
410 | name = LaunchScreen.storyboard;
411 | sourceTree = "";
412 | };
413 | /* End PBXVariantGroup section */
414 |
415 | /* Begin XCBuildConfiguration section */
416 | D358B7E51D548731003FD81E /* Debug */ = {
417 | isa = XCBuildConfiguration;
418 | buildSettings = {
419 | ALWAYS_SEARCH_USER_PATHS = NO;
420 | CLANG_ANALYZER_NONNULL = YES;
421 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
422 | CLANG_CXX_LIBRARY = "libc++";
423 | CLANG_ENABLE_MODULES = YES;
424 | CLANG_ENABLE_OBJC_ARC = YES;
425 | CLANG_WARN_BOOL_CONVERSION = YES;
426 | CLANG_WARN_CONSTANT_CONVERSION = YES;
427 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
428 | CLANG_WARN_EMPTY_BODY = YES;
429 | CLANG_WARN_ENUM_CONVERSION = YES;
430 | CLANG_WARN_INT_CONVERSION = YES;
431 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
432 | CLANG_WARN_UNREACHABLE_CODE = YES;
433 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
434 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
435 | COPY_PHASE_STRIP = NO;
436 | DEBUG_INFORMATION_FORMAT = dwarf;
437 | ENABLE_STRICT_OBJC_MSGSEND = YES;
438 | ENABLE_TESTABILITY = YES;
439 | GCC_C_LANGUAGE_STANDARD = gnu99;
440 | GCC_DYNAMIC_NO_PIC = NO;
441 | GCC_NO_COMMON_BLOCKS = YES;
442 | GCC_OPTIMIZATION_LEVEL = 0;
443 | GCC_PREPROCESSOR_DEFINITIONS = (
444 | "DEBUG=1",
445 | "$(inherited)",
446 | );
447 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
448 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
449 | GCC_WARN_UNDECLARED_SELECTOR = YES;
450 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
451 | GCC_WARN_UNUSED_FUNCTION = YES;
452 | GCC_WARN_UNUSED_VARIABLE = YES;
453 | IPHONEOS_DEPLOYMENT_TARGET = 9.3;
454 | MTL_ENABLE_DEBUG_INFO = YES;
455 | ONLY_ACTIVE_ARCH = YES;
456 | SDKROOT = iphoneos;
457 | };
458 | name = Debug;
459 | };
460 | D358B7E61D548731003FD81E /* Release */ = {
461 | isa = XCBuildConfiguration;
462 | buildSettings = {
463 | ALWAYS_SEARCH_USER_PATHS = NO;
464 | CLANG_ANALYZER_NONNULL = YES;
465 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
466 | CLANG_CXX_LIBRARY = "libc++";
467 | CLANG_ENABLE_MODULES = YES;
468 | CLANG_ENABLE_OBJC_ARC = YES;
469 | CLANG_WARN_BOOL_CONVERSION = YES;
470 | CLANG_WARN_CONSTANT_CONVERSION = YES;
471 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
472 | CLANG_WARN_EMPTY_BODY = YES;
473 | CLANG_WARN_ENUM_CONVERSION = YES;
474 | CLANG_WARN_INT_CONVERSION = YES;
475 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
476 | CLANG_WARN_UNREACHABLE_CODE = YES;
477 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
478 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
479 | COPY_PHASE_STRIP = NO;
480 | DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
481 | ENABLE_NS_ASSERTIONS = NO;
482 | ENABLE_STRICT_OBJC_MSGSEND = YES;
483 | GCC_C_LANGUAGE_STANDARD = gnu99;
484 | GCC_NO_COMMON_BLOCKS = YES;
485 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
486 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
487 | GCC_WARN_UNDECLARED_SELECTOR = YES;
488 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
489 | GCC_WARN_UNUSED_FUNCTION = YES;
490 | GCC_WARN_UNUSED_VARIABLE = YES;
491 | IPHONEOS_DEPLOYMENT_TARGET = 9.3;
492 | MTL_ENABLE_DEBUG_INFO = NO;
493 | SDKROOT = iphoneos;
494 | VALIDATE_PRODUCT = YES;
495 | };
496 | name = Release;
497 | };
498 | D358B7E81D548731003FD81E /* Debug */ = {
499 | isa = XCBuildConfiguration;
500 | buildSettings = {
501 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
502 | GCC_PREFIX_HEADER = /Users/imac/Desktop/STNavBar/STNavBar/STNavPch.pch;
503 | INFOPLIST_FILE = STNavBar/Info.plist;
504 | IPHONEOS_DEPLOYMENT_TARGET = 7.1;
505 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
506 | PRODUCT_BUNDLE_IDENTIFIER = com.testigancao.STNavBar;
507 | PRODUCT_NAME = "$(TARGET_NAME)";
508 | };
509 | name = Debug;
510 | };
511 | D358B7E91D548731003FD81E /* Release */ = {
512 | isa = XCBuildConfiguration;
513 | buildSettings = {
514 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
515 | GCC_PREFIX_HEADER = /Users/imac/Desktop/STNavBar/STNavBar/STNavPch.pch;
516 | INFOPLIST_FILE = STNavBar/Info.plist;
517 | IPHONEOS_DEPLOYMENT_TARGET = 7.1;
518 | LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
519 | PRODUCT_BUNDLE_IDENTIFIER = com.testigancao.STNavBar;
520 | PRODUCT_NAME = "$(TARGET_NAME)";
521 | };
522 | name = Release;
523 | };
524 | /* End XCBuildConfiguration section */
525 |
526 | /* Begin XCConfigurationList section */
527 | D358B7CB1D54872E003FD81E /* Build configuration list for PBXProject "STNavBar" */ = {
528 | isa = XCConfigurationList;
529 | buildConfigurations = (
530 | D358B7E51D548731003FD81E /* Debug */,
531 | D358B7E61D548731003FD81E /* Release */,
532 | );
533 | defaultConfigurationIsVisible = 0;
534 | defaultConfigurationName = Release;
535 | };
536 | D358B7E71D548731003FD81E /* Build configuration list for PBXNativeTarget "STNavBar" */ = {
537 | isa = XCConfigurationList;
538 | buildConfigurations = (
539 | D358B7E81D548731003FD81E /* Debug */,
540 | D358B7E91D548731003FD81E /* Release */,
541 | );
542 | defaultConfigurationIsVisible = 0;
543 | defaultConfigurationName = Release;
544 | };
545 | /* End XCConfigurationList section */
546 | };
547 | rootObject = D358B7C81D54872E003FD81E /* Project object */;
548 | }
549 |
--------------------------------------------------------------------------------
/STNavBar/view/HeaderView/DetailHeaderView.xib:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
30 |
31 |
37 |
45 |
51 |
58 |
65 |
71 |
77 |
78 |
79 |
80 |
81 |
82 |
83 |
84 |
90 |
96 |
102 |
103 |
104 |
105 |
106 |
107 |
108 |
109 |
110 |
111 |
112 |
113 |
114 |
115 |
116 |
117 |
118 |
119 |
120 |
121 |
122 |
123 |
124 |
125 |
126 |
127 |
128 |
129 |
130 |
131 |
132 |
133 |
134 |
135 |
136 |
137 |
138 |
139 |
140 |
141 |
147 |
155 |
161 |
168 |
175 |
181 |
187 |
188 |
189 |
190 |
191 |
192 |
193 |
194 |
200 |
206 |
212 |
213 |
214 |
215 |
216 |
217 |
218 |
219 |
220 |
221 |
222 |
223 |
224 |
225 |
226 |
227 |
228 |
229 |
230 |
231 |
232 |
233 |
234 |
235 |
236 |
237 |
238 |
239 |
240 |
241 |
242 |
243 |
244 |
245 |
246 |
247 |
248 |
249 |
250 |
251 |
257 |
265 |
271 |
278 |
285 |
291 |
297 |
298 |
299 |
300 |
301 |
302 |
303 |
304 |
310 |
316 |
322 |
323 |
324 |
325 |
326 |
327 |
328 |
329 |
330 |
331 |
332 |
333 |
334 |
335 |
336 |
337 |
338 |
339 |
340 |
341 |
342 |
343 |
344 |
345 |
346 |
347 |
348 |
349 |
350 |
351 |
352 |
353 |
354 |
355 |
356 |
357 |
358 |
364 |
365 |
366 |
367 |
368 |
369 |
370 |
371 |
372 |
373 |
374 |
375 |
376 |
377 |
378 |
379 |
380 |
381 |
382 |
383 |
384 |
385 |
386 |
387 |
388 |
389 |
390 |
391 |
--------------------------------------------------------------------------------