BBASMUIPluginUtilProtocol.h
3.77 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
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
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
142
143
144
145
146
147
148
149
150
151
//
// BBASMUIPluginUtilProtocol.h
// SWAN
//
// Created by baidu on 2018/10/29.
// Copyright © 2018 baidu. All rights reserved.
//
#import <Foundation/Foundation.h>
#import <Pyramid/Pyramid.h>
#import "BBASMComponent.h"
AliasService(BBASMUIPluginUtilProtocol, bba_MNPUIPluginUtil)
@class BBASchemeDispatcher;
@protocol BBASMUIPluginUtilProtocol <NSObject>
/**
* @brief 创建并添加组件到组件管理
*
* @param dispatcher 协议
* @param componentView 组件
* @param compIdKey 组件id
* @param compName 组件名称
* @param item 组件Item class
* @param view 从外面传入的组件父视图
* @return 组件Item
*/
+ (BBASMComponent)addComponent:(BBASchemeDispatcher *)dispatcher
view:(UIView *)componentView
idKey:(NSString *)compIdKey
name:(NSString *)compName
item:(BBASMComponent)item
toView:(UIView *)view;
/**
* @brief 根据componentView 移除组件
*
* @param componentView 组件
*/
+ (void)removeComponentForView:(UIView *)componentView;
/**
根据 调起协议移除组件
@param dispatcher 调起协议
@param compIdKey 组件ID key
*/
+ (void)removeComponent:(BBASchemeDispatcher *)dispatcher
idKey:(NSString *)compIdKey;
/**
* @brief 更新组件
*
* @param componentView 组件
* @param dispatcher 协议
*/
+ (void)updateComponentView:(UIView *)componentView
withDispatcher:(BBASchemeDispatcher *)dispatcher;
/**
* @brief 更新组件
*
* @param componentView 组件
* @param dispatcher 协议
* @param check 是否检查父视图的变化
*/
+ (void)updateComponentView:(UIView *)componentView
withDispatcher:(BBASchemeDispatcher *)dispatcher
checkParentViewChange:(BOOL)check;
/**
* @brief 通过componentID获取组件
*
* @param dispatcher 协议
* @param componentID 组件id
* @return 组件的componentView
*/
+ (UIView *)componentViewWithDispatcher:(BBASchemeDispatcher *)dispatcher
componentID:(NSString *)componentID;
/**
* @brief 获取组件
*
* @param dispatcher 调起协议
* @param compIdKey 组件id key
* @return 组件
*/
+ (BBASMComponent)componentWithDispatcher:(BBASchemeDispatcher *)dispatcher
idKey:(NSString *)compIdKey;
/**
* @brief 获取组件
*
* @param dispatcher 调起协议
* @param componentID 组件id
* @return 组件
*/
+ (BBASMComponent )componentWithDispatcher:(BBASchemeDispatcher *)dispatcher
componentID:(NSString *)componentID;
/**
* @brief 获取组件容器
*
* @param info 组件模型对象
* @return 组件容器
*/
+(UIViewController<BBASMComponentManagerProtocol, BBASMRenderBaseViewControllerProtocol, BBASMRenderBaseControllerUIProtocol> *)containerWithInfo:(id<BBASMComponentInfoProtocol>)info;
/**
* @brief 获取stackViewController
*
* @param dispatcher 协议
*/
+ (UIViewController *)getPageStackWithDispatcher:(BBASchemeDispatcher *)dispatcher;
/**
* @brief 获取stackViewController
*
* @param appId appId
* @return stackViewController
*/
+ (UIViewController *)getPageStackWithAppId:(NSString *)appId;
/**
* @brief 更新组件的 position参数
*
* @param dispatcher BBASchemeDispatcher
* @return 返回更新过position的所有参数 NSDictionary
*/
+ (NSDictionary *)updateComponentPositionParam:(BBASchemeDispatcher *)dispatcher;
/**
* @brief 检查组件的父视图 如果发生变化则更新
*
* @param item 组件
* @param dispatcher dispatcher
*/
+ (void)updateSuperViewIfNeeded:(BBASMComponent)item
dispatcher:(BBASchemeDispatcher *)dispatcher;
/**
* @brief div class属性 是否会生成layer.name
*
* @return YES 生成
*/
+ (BOOL)webKitConvertDivClassToLayerName;
@end