-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathFFSchemaManager.h
More file actions
77 lines (58 loc) · 2.19 KB
/
Copy pathFFSchemaManager.h
File metadata and controls
77 lines (58 loc) · 2.19 KB
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
74
75
76
77
//
// FFSchemaManager.h
//
// Created by wujiangwei on 14/10/28.
// Copyright (c) 2014年 Kevin.Wu. All rights reserved.
//
#import <Foundation/Foundation.h>
#import <UIKit/UIKit.h>
typedef BOOL(^schemaLoginBlock)();
@interface FFSchemaManager : NSObject
+ (FFSchemaManager *)sharedInstance;
/*
******* Config these when your App lanuch ********
*/
//config schema
//configSchemaName can just be lower string
- (void)configSchema:(NSString *)configSchemaName isLoginBlock:(schemaLoginBlock)block;
//config schema vc push animation
//default is YES
- (void)configSchemaVCPushAnimation:(BOOL)vcPushAnimation;
/*
* Default not support storyboard
* Call this method to support storyboard
* storyboardName:your storyboard name
*
* If you use storyboard
* the StoryboardId in your storyboard:
* In the schema.plist name(key)-value(StoryboardId)
**/
- (void)configStoryboardSchema:(NSString *)storyboardName;
/******** End: Config these when your App lanuch *********/
//determine schema format is the schema in this application
- (BOOL)isAppSchema:(NSURL *)url;
//does the schema url work in this application
//support IOS Schema and application schema
- (BOOL)canOpenUrl:(NSURL *)url;
/*
if your want open schema in Selector:
- (BOOL)application:(UIApplication *)application openURL:(NSURL *)url sourceApplication:(NSString *)sourceApplication annotation:(id)annotation
you must call this method to judge is this schema return to your app
like your app shares some thing to QQ,and user return from qq
In this case,you can not open the url
this method is design for you to judge is return from share app
**/
//Please using your share SDK do this things
//like ShareSDK.h support method:
/* + (BOOL)handleOpenURL:(NSURL *)url sourceApplication:(NSString *)sourceApplication
annotation:(id)annotation wxDelegate:(id)wxDelegate*/
//if return YES,please do not call
// - (BOOL)openURL:(NSURL *)url
//so this method do not need again
//- (BOOL)canOpenUrl:(NSURL *)url sourceApp:(NSString *)sourceApp;
//open schema
//return :did open your schema succeed
- (BOOL)openURL:(NSURL *)url;
//custom TabBarController class name
- (void)addTabBarControllerClassName:(NSString *)className;
@end