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
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
//
// KWMBaseVC.h
// iBallsoul
//
// Created by Yaotian on 3/25/16.
// Copyright © 2016 kwm. All rights reserved.
//
#import <UIKit/UIKit.h>
#import "KWMAPIManager.h"
#import "KWMUserDao.h"
//#import <MAMapKit/MAMapKit.h>
//#import <AMapLocationKit/AMapLocationKit.h>
#import "AppDelegate.h"
#import <SDWebImage/UIImageView+WebCache.h>
#import "MZFormSheetPresentationViewController.h"
#import "Buy/Buy.h"
#import <PPNetworkHelper/PPNetworkCache.h>
@class AppDelegate;
@interface KWMBaseVC : UIViewController
@property (nonatomic,weak) AppDelegate *appDelegate;
@property (nonatomic) KWMAPIManager *api;
@property (nonatomic) BUYClient *client;
@property (nonatomic) KWMUserDao *userDao;
@property (nonatomic) CGFloat keyboardHeight;
+ (NSString *)kwmTag;
+ (NSString *)kwmBoard;
+ (KWMBaseVC *)findControllerBy:(NSString *)controllerId
fromStoryboard:(NSString *)storyboardName;
+ (instancetype) getNewInstance;
- (void(^)(NSURLSessionDataTask *, NSError *))defaultFailure;
- (void)popDelay;
- (void)popDelay:(NSTimeInterval)sec;
- (void)showEmptyView:(NSInteger)type setTips:(NSString *)tips;
- (void)hideEmptyView;
- (void)showLoading;
- (void)showLoading:(UIView *)view cancelable:(BOOL)isCancelable loadingBg:(UIColor *) color;
- (void)hideLoading;
- (void)showToast:(NSString *)message;
- (void)showDialog:(NSString *)message;
- (void)reLoadData;
- (void)loadData;
- (BOOL)checkLogin;
- (void)transparentNavigationBar;
- (void)unTransparentNavigationBar;
- (void)showError:(NSError *)error;
- (BOOL)hasError:(id)result;
- (BOOL)hasCemaroseError:(KWMCemaroseResult *)result;
- (void)keyboardWillHide:(NSNotification *)notification;
- (void)keyboardWillShow:(NSNotification *)notification;
- (void)keyboardWillChangeFrame:(NSNotification *)notification;
- (void)initCustomTitleBarConstarints:(UIView *)titleView;
- (UIBarButtonItem *)createBarButtonItem:(NSString *)title
image:(UIImage *)image
action:(SEL)action;
- (MZFormSheetPresentationViewController *)showPresentation:(UIViewController *)vc size:(CGSize)size tapOutsideClose:(BOOL)tapOutsideClose style:(MZFormSheetPresentationTransitionStyle)style;
/**将URL转成UIImage*/
- (void)sd_setImageWithURL:(NSURL *)url placeholderImage:(UIImage *)placeholder options:(SDWebImageOptions)options progress:(SDWebImageDownloaderProgressBlock)progressBlock completed:(SDWebImageCompletionBlock)completedBlock;
@end