Skip to content

Commit

Permalink
Merge pull request #5 from alibaba/ios-feature-20161118
Browse files Browse the repository at this point in the history
update iOS  SDK
  • Loading branch information
acton393 authored Oct 28, 2016
2 parents 62447f1 + 24f705a commit 5322ae6
Show file tree
Hide file tree
Showing 5 changed files with 11 additions and 5 deletions.
8 changes: 8 additions & 0 deletions ios/sdk/WeexSDK.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -182,6 +182,8 @@
77E65A161C155EB5008B8775 /* WXTextComponent.m in Sources */ = {isa = PBXBuildFile; fileRef = 77E65A141C155EB5008B8775 /* WXTextComponent.m */; };
77E65A191C155F25008B8775 /* WXScrollerComponent.h in Headers */ = {isa = PBXBuildFile; fileRef = 77E65A171C155F25008B8775 /* WXScrollerComponent.h */; settings = {ATTRIBUTES = (Public, ); }; };
77E65A1A1C155F25008B8775 /* WXScrollerComponent.m in Sources */ = {isa = PBXBuildFile; fileRef = 77E65A181C155F25008B8775 /* WXScrollerComponent.m */; };
C41E1A971DC1FD15009C7F90 /* WXDatePickerManager.h in Headers */ = {isa = PBXBuildFile; fileRef = C41E1A951DC1FD15009C7F90 /* WXDatePickerManager.h */; };
C41E1A981DC1FD15009C7F90 /* WXDatePickerManager.m in Sources */ = {isa = PBXBuildFile; fileRef = C41E1A961DC1FD15009C7F90 /* WXDatePickerManager.m */; };
D312CE3B1C730DEB00046D68 /* WXWebComponent.h in Headers */ = {isa = PBXBuildFile; fileRef = D312CE391C730DEB00046D68 /* WXWebComponent.h */; };
D312CE3C1C730DEB00046D68 /* WXWebComponent.m in Sources */ = {isa = PBXBuildFile; fileRef = D312CE3A1C730DEB00046D68 /* WXWebComponent.m */; };
D317338C1C57257000BB7539 /* WXTransform.h in Headers */ = {isa = PBXBuildFile; fileRef = D317338A1C57257000BB7539 /* WXTransform.h */; };
Expand Down Expand Up @@ -416,6 +418,8 @@
77E65A141C155EB5008B8775 /* WXTextComponent.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = WXTextComponent.m; sourceTree = "<group>"; };
77E65A171C155F25008B8775 /* WXScrollerComponent.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = WXScrollerComponent.h; sourceTree = "<group>"; };
77E65A181C155F25008B8775 /* WXScrollerComponent.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = WXScrollerComponent.m; sourceTree = "<group>"; };
C41E1A951DC1FD15009C7F90 /* WXDatePickerManager.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = WXDatePickerManager.h; sourceTree = "<group>"; };
C41E1A961DC1FD15009C7F90 /* WXDatePickerManager.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = WXDatePickerManager.m; sourceTree = "<group>"; };
D312CE391C730DEB00046D68 /* WXWebComponent.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = WXWebComponent.h; sourceTree = "<group>"; };
D312CE3A1C730DEB00046D68 /* WXWebComponent.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = WXWebComponent.m; sourceTree = "<group>"; };
D317338A1C57257000BB7539 /* WXTransform.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = WXTransform.h; sourceTree = "<group>"; };
Expand Down Expand Up @@ -694,6 +698,8 @@
77D1611A1C02DD3C0010B15B /* Manager */ = {
isa = PBXGroup;
children = (
C41E1A951DC1FD15009C7F90 /* WXDatePickerManager.h */,
C41E1A961DC1FD15009C7F90 /* WXDatePickerManager.m */,
77D161261C02DE1A0010B15B /* WXSDKManager.h */,
77D161271C02DE1A0010B15B /* WXSDKManager.m */,
77D161361C02DE940010B15B /* WXBridgeManager.h */,
Expand Down Expand Up @@ -966,6 +972,7 @@
DCAB35FE1D658EB700C0EA70 /* WXRuleManager.h in Headers */,
748B25181C44A6F9005D491E /* WXSDKInstance_private.h in Headers */,
77E65A0D1C155E99008B8775 /* WXDivComponent.h in Headers */,
C41E1A971DC1FD15009C7F90 /* WXDatePickerManager.h in Headers */,
7461F8901CFB373100F62D44 /* WXDisplayQueue.h in Headers */,
DCC77C141D770AE300CE7288 /* WXSliderNeighborComponent.h in Headers */,
77E659F11C0C3612008B8775 /* WXModuleFactory.h in Headers */,
Expand Down Expand Up @@ -1259,6 +1266,7 @@
7461F8931CFB373100F62D44 /* WXLayer.m in Sources */,
59D3CA471CFC3CC0008835DC /* WXSliderComponent.m in Sources */,
77D1613D1C02DEA60010B15B /* WXJSCoreBridge.m in Sources */,
C41E1A981DC1FD15009C7F90 /* WXDatePickerManager.m in Sources */,
77D1614C1C02E3790010B15B /* WXConvert.m in Sources */,
749DC27C1D40827B009E1C91 /* WXMonitor.m in Sources */,
77E659FB1C0EE579008B8775 /* WXBridgeMethod.m in Sources */,
Expand Down
2 changes: 1 addition & 1 deletion ios/sdk/WeexSDK/Sources/Manager/WXComponentManager.m
Original file line number Diff line number Diff line change
Expand Up @@ -165,7 +165,7 @@ - (void)createRoot:(NSDictionary *)data
__weak typeof(self) weakSelf = self;
[self _addUITask:^{
__strong typeof(self) strongSelf = weakSelf;
strongSelf.weexInstance.rootView.wx_component = _rootComponent;
strongSelf.weexInstance.rootView.wx_component = strongSelf->_rootComponent;
[strongSelf.weexInstance.rootView addSubview:strongSelf->_rootComponent.view];
}];
}
Expand Down
2 changes: 0 additions & 2 deletions ios/sdk/WeexSDK/Sources/Manager/WXDatePickerManager.m
Original file line number Diff line number Diff line change
Expand Up @@ -254,7 +254,6 @@ -(NSDate *)inputTimeStringToDate:(NSString *)dateString

-(NSString *)dateToString:(NSDate *)date
{
NSDate *currentDate = [NSDate date];
NSDateFormatter *dateFormatter = [[NSDateFormatter alloc] init];
[dateFormatter setDateFormat:@"yyyy-MM-dd"];
NSString *str = [dateFormatter stringFromDate:date];
Expand All @@ -263,7 +262,6 @@ -(NSString *)dateToString:(NSDate *)date

-(NSString *)timeToString:(NSDate *)date
{
NSDate *currentDate = [NSDate date];
NSDateFormatter *dateFormatter = [[NSDateFormatter alloc] init];
[dateFormatter setDateFormat:@"HH:mm"];
NSString *str = [dateFormatter stringFromDate:date];
Expand Down
2 changes: 1 addition & 1 deletion ios/sdk/WeexSDK/Sources/Model/WXSDKInstance.h
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ extern NSString *const bundleUrlOptionKey;
/**
* The rootView which the weex bundle is rendered at.
**/
@property (nonatomic, strong) UIView *rootView;
@property (nonatomic, strong, readonly) UIView *rootView;

/**
* The scriptURL of weex bundle.
Expand Down
2 changes: 1 addition & 1 deletion ios/sdk/WeexSDK/Sources/Model/WXSDKInstance.m
Original file line number Diff line number Diff line change
Expand Up @@ -199,7 +199,7 @@ - (void)renderView:(NSString *)source options:(NSDictionary *)options data:(id)d

//TODO WXRootView
WXPerformBlockOnMainThread(^{
self.rootView = [[WXView alloc] initWithFrame:self.frame];
_rootView = [[WXView alloc] initWithFrame:self.frame];
if(self.onCreate) {
self.onCreate(self.rootView);
}
Expand Down

0 comments on commit 5322ae6

Please sign in to comment.