feat:add slider in iOS
This commit is contained in:
parent
c3b656d539
commit
3c9d66db1a
@ -31,6 +31,8 @@
|
||||
#import "DoricListNode.h"
|
||||
#import "DoricListItemNode.h"
|
||||
#import "DoricScrollerNode.h"
|
||||
#import "DoricSliderNode.h"
|
||||
#import "DoricSlideItemNode.h"
|
||||
|
||||
@interface DoricRegistry ()
|
||||
|
||||
@ -64,6 +66,8 @@ - (void)innerRegister {
|
||||
[self registerViewNode:DoricListNode.class withName:@"List"];
|
||||
[self registerViewNode:DoricListItemNode.class withName:@"ListItem"];
|
||||
[self registerViewNode:DoricScrollerNode.class withName:@"Scroller"];
|
||||
[self registerViewNode:DoricSliderNode.class withName:@"Slider"];
|
||||
[self registerViewNode:DoricSlideItemNode.class withName:@"SlideItem"];
|
||||
}
|
||||
|
||||
- (void)registerJSBundle:(NSString *)bundle withName:(NSString *)name {
|
||||
|
@ -13,6 +13,12 @@
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
//
|
||||
// DoricScrollerNode.h
|
||||
// Doric
|
||||
//
|
||||
// Created by pengfei.zhou on 2019/11/19.
|
||||
//
|
||||
#import <Foundation/Foundation.h>
|
||||
#import "DoricSuperNode.h"
|
||||
|
||||
|
@ -13,6 +13,12 @@
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
//
|
||||
// DoricScrollerNode.m
|
||||
// Doric
|
||||
//
|
||||
// Created by pengfei.zhou on 2019/11/19.
|
||||
//
|
||||
#import "DoricScrollerNode.h"
|
||||
#import "DoricExtensions.h"
|
||||
|
||||
|
26
iOS/Pod/Classes/Shader/DoricSlideItemNode.h
Normal file
26
iOS/Pod/Classes/Shader/DoricSlideItemNode.h
Normal file
@ -0,0 +1,26 @@
|
||||
/*
|
||||
* Copyright [2019] [Doric.Pub]
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
//
|
||||
// DoricSlideItemNode.h
|
||||
// Doric
|
||||
//
|
||||
// Created by pengfei.zhou on 2019/11/19.
|
||||
//
|
||||
#import <Foundation/Foundation.h>
|
||||
#import "DoricStackNode.h"
|
||||
|
||||
@interface DoricSlideItemNode : DoricStackNode
|
||||
@end
|
47
iOS/Pod/Classes/Shader/DoricSlideItemNode.m
Normal file
47
iOS/Pod/Classes/Shader/DoricSlideItemNode.m
Normal file
@ -0,0 +1,47 @@
|
||||
/*
|
||||
* Copyright [2019] [Doric.Pub]
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
//
|
||||
// DoricSlideItemNode.m
|
||||
// Doric
|
||||
//
|
||||
// Created by pengfei.zhou on 2019/11/19.
|
||||
//
|
||||
#import "DoricSlideItemNode.h"
|
||||
|
||||
@interface DoricSlideItemView : DoricStackView
|
||||
@end
|
||||
|
||||
@implementation DoricSlideItemView
|
||||
@end
|
||||
|
||||
@implementation DoricSlideItemNode
|
||||
|
||||
- (instancetype)initWithContext:(DoricContext *)doricContext {
|
||||
if (self = [super initWithContext:doricContext]) {
|
||||
self.reusable = YES;
|
||||
}
|
||||
return self;
|
||||
}
|
||||
|
||||
- (void)initWithSuperNode:(DoricSuperNode *)superNode {
|
||||
[super initWithSuperNode:superNode];
|
||||
self.reusable = YES;
|
||||
}
|
||||
|
||||
- (DoricStackView *)build {
|
||||
return [DoricSlideItemView new];
|
||||
}
|
||||
@end
|
27
iOS/Pod/Classes/Shader/DoricSliderNode.h
Normal file
27
iOS/Pod/Classes/Shader/DoricSliderNode.h
Normal file
@ -0,0 +1,27 @@
|
||||
/*
|
||||
* Copyright [2019] [Doric.Pub]
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
//
|
||||
// DoricSliderNode.h
|
||||
// Doric
|
||||
//
|
||||
// Created by pengfei.zhou on 2019/11/19.
|
||||
//
|
||||
#import <Foundation/Foundation.h>
|
||||
|
||||
#import "DoricSuperNode.h"
|
||||
|
||||
@interface DoricSliderNode : DoricSuperNode<UICollectionView *>
|
||||
@end
|
28
iOS/Pod/Classes/Shader/DoricSliderNode.m
Normal file
28
iOS/Pod/Classes/Shader/DoricSliderNode.m
Normal file
@ -0,0 +1,28 @@
|
||||
/*
|
||||
* Copyright [2019] [Doric.Pub]
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
//
|
||||
// DoricSliderNode.m
|
||||
// Doric
|
||||
//
|
||||
// Created by pengfei.zhou on 2019/11/19.
|
||||
//
|
||||
#import "DoricSliderNode.h"
|
||||
|
||||
|
||||
@implementation DoricSliderNode {
|
||||
|
||||
}
|
||||
@end
|
Reference in New Issue
Block a user