91 lines
2.4 KiB
Objective-C
Executable File
91 lines
2.4 KiB
Objective-C
Executable File
//
|
||
// PYBaseViewController.h
|
||
// Food
|
||
//
|
||
// Created by ko1o on 2019/7/16.
|
||
// Copyright © 2019年 ko1o. All rights reserved.
|
||
//
|
||
|
||
#import <UIKit/UIKit.h>
|
||
|
||
#import "MTStatefulBaseView.h"
|
||
|
||
#import "THViewController.h"
|
||
|
||
NS_ASSUME_NONNULL_BEGIN
|
||
|
||
|
||
|
||
|
||
|
||
#pragma mark - Old
|
||
|
||
@interface PYBaseViewController : UIViewController
|
||
|
||
@property (nonatomic, assign) BOOL mt_nagationBarTransparent;
|
||
|
||
//@property (nonatomic, assign) BOOL fd_prefersNavigationBarHidden;//设置YES 可以隐藏导航栏
|
||
@property (nonatomic, assign) BOOL fd_interactivePopDisabled; //默认支持边缘右滑返回上一级,设置YES可禁用
|
||
|
||
|
||
@property (nonatomic, strong) UIScrollView *contentScrollView;
|
||
|
||
//return YES 支持全屏布局 Default is YES
|
||
- (BOOL)isSupportFullScreenLayout;
|
||
|
||
// Default is NO. 是否自动创建baseScrollView
|
||
- (BOOL)isSupportContentScrollView;
|
||
|
||
// Default is YES
|
||
- (BOOL)enableAutoToolbar;
|
||
// Defaule is NO
|
||
- (BOOL)isNavigationBarHidden;
|
||
|
||
/// 默认空内容提醒内容
|
||
- (NSString *)emptyTips;
|
||
|
||
//页面状态切换
|
||
//- (void)mt_startStatefulLoading:(BOOL)animated;
|
||
//- (void)mt_endStatefulLoading:(BOOL)animated error:(NSError *)error ;
|
||
- (void)startLoading;
|
||
- (void)endLoading:(NSError * _Nullable )error;
|
||
|
||
- (BOOL)canBack;
|
||
- (void)back;
|
||
|
||
@property (nonatomic, copy) dispatch_block_t didClickedRefreshBlock;
|
||
|
||
//overrid 配置是否显示loading empty error 页面提示 Default NO
|
||
- (BOOL)mt_shouldSetupStateful;
|
||
//overrid 表示内容是否为空,返回若为NO,会显示空页面提醒
|
||
- (BOOL)mt_hasContentForStateful;
|
||
|
||
//overrid optional
|
||
- (MTStatefulConfigItem *)statefulConfigItemForStatefulViewType:(MTStatefulViewType)statefulViewType;
|
||
|
||
/// 透明导航栏
|
||
- (BOOL)mt_nagationBarTransparent;
|
||
|
||
/// 是否支持分享 默认:NO
|
||
- (BOOL)isSupportShare;
|
||
|
||
@end
|
||
|
||
NS_ASSUME_NONNULL_END
|
||
|
||
|
||
//Navigationbar Appearance 导航栏样式
|
||
@interface UIViewController (MTAppearance)
|
||
@property (nonatomic, assign) UIBarStyle mt_barStyle;
|
||
@property (nonatomic, assign) BOOL mt_translucent;
|
||
@property (nonatomic, assign) BOOL mt_prefersNavigationBarShadowHidden;
|
||
@property (nonatomic, strong) UIColor * mt_nav_barTintColor;
|
||
@property (nonatomic, strong) UIColor * mt_navbarBackgroundImageColor;
|
||
@property (nonatomic, strong) UIColor * mt_nav_tintColor;
|
||
@property (nonatomic, strong) NSDictionary * mt_titleTextAttributes;
|
||
@property (nonatomic, strong) UIImage * mt_navbarBackgroundImage;
|
||
|
||
- (void)mt_applyAppearanceToNavigationBar:(UINavigationBar *) navigationBar;
|
||
|
||
@end
|