mirror of
https://github.com/zhigang1992/react-native.git
synced 2026-02-13 09:20:15 +08:00
Added iOS indicatorStyle prop to ScrollView
Summary: Hi, The doc wording was adapted from https://developer.apple.com/library/ios/documentation/UIKit/Reference/UIScrollView_Class/#//apple_ref/doc/c_ref/UIScrollViewIndicatorStyle Note that the iOS doc is misleading, and `UIScrollViewIndicatorStyleDefault` is the same as `UIScrollViewIndicatorStyleBlack` (since iOS 7 I think). Let me know what you think. Closes https://github.com/facebook/react-native/pull/5583 Reviewed By: svcscm Differential Revision: D2870011 Pulled By: nicklockwood fb-gh-sync-id: d28a96e1a2d4610cbeaee0ae70108ab9d9f05fdb
This commit is contained in:
committed by
facebook-github-bot-6
parent
f685878938
commit
b84f5fb6c9
@@ -141,6 +141,18 @@ var ScrollView = React.createClass({
|
||||
* instead of vertically in a column. The default value is false.
|
||||
*/
|
||||
horizontal: PropTypes.bool,
|
||||
/**
|
||||
* The style of the scroll indicators.
|
||||
* - `default` (the default), same as `black`.
|
||||
* - `black`, scroll indicator is black. This style is good against a white content background.
|
||||
* - `white`, scroll indicator is white. This style is good against a black content background.
|
||||
* @platform ios
|
||||
*/
|
||||
indicatorStyle: PropTypes.oneOf([
|
||||
'default', // default
|
||||
'black',
|
||||
'white',
|
||||
]),
|
||||
/**
|
||||
* When true, the ScrollView will try to lock to only vertical or horizontal
|
||||
* scrolling while dragging. The default value is false.
|
||||
@@ -524,6 +536,7 @@ var validAttributes = {
|
||||
contentOffset: {diff: pointsDiffer},
|
||||
decelerationRate: true,
|
||||
horizontal: true,
|
||||
indicatorStyle: true,
|
||||
keyboardDismissMode: true,
|
||||
keyboardShouldPersistTaps: true,
|
||||
maximumZoomScale: true,
|
||||
|
||||
Reference in New Issue
Block a user