Skip to content

UISearchBar cannot display #1270

Description

@bolasblack

My Obj-C Code:

 #import<UIKit/UIKit.h>
#import"RCTViewManager.h"@interfaceRCTSearchBarTest : RCTViewManager@end@implementationRCTSearchBarTestRCT_EXPORT_MODULE()
- (UISearchBar *)view
{
return [[UISearchBar alloc] init];
}
@end

My js code:

var{requireNativeComponent}=React;varRCTSearchBarTest=requireNativeComponent('RCTSearchBarTest',null);varApp=React.createClass({render: function(){<View><RCTSearchBarTest/></View>}})

I learned it from React-Native's document: https://facebook.github.io/react-native/docs/nativecomponentsios.html

I tried Reveal, the UISearchBar is exist, but not displayed.

After I add code [searchBar setFrame:CGRectMake(0, 0, 375, 44)];, it works, but I lookup from React-Native's code I didn't found anything like this.

Actual code: CoffeeScript, Objective-C

Is anything I missed?

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions