mirror of
https://github.com/zhigang1992/react-native.git
synced 2026-02-12 22:29:41 +08:00
Fix code blocks in README
This commit is contained in:
10
README.md
10
README.md
@@ -154,7 +154,7 @@ var Message = React.createClass({
|
||||
|
||||
Custom iOS views can be exposed by subclassing RCTViewManager, implementing a -(UIView *)view method, and exporting properties with the RCT_EXPORT_VIEW_PROPERTY macro. Then a simple JavaScript file connects the dots.
|
||||
|
||||
```javascript
|
||||
```objc
|
||||
// Objective-C
|
||||
#import "RCTViewManager.h"
|
||||
@interface MyCustomViewManager : RCTViewManager
|
||||
@@ -166,12 +166,12 @@ Custom iOS views can be exposed by subclassing RCTViewManager, implementing a -(
|
||||
}
|
||||
RCT_EXPORT_VIEW_PROPERTY(myCustomProperty);
|
||||
@end`}
|
||||
</Prism>
|
||||
<Prism>
|
||||
{`// JavaScript
|
||||
```
|
||||
|
||||
```javascript
|
||||
module.exports = createReactIOSNativeComponentClass({
|
||||
validAttributes: { myCustomProperty: true },
|
||||
uiViewClassName: 'MyCustomView',
|
||||
});`}
|
||||
});
|
||||
```
|
||||
|
||||
|
||||
Reference in New Issue
Block a user