Code Monkey home page Code Monkey logo

bilibili-react-native's People

Contributors

879479119 avatar uu-z avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

bilibili-react-native's Issues

can't run now for some bugs.

  1. searchScreen.js NEED rename to SearchScreen.js
  2. two export default.
  3. can'f find variable FETCH.

it seems you need do some base test before push to github. ^_^
any way, thanks for sharing code with githuber , we are following.....

看来现在用双层ScrollView嵌套是最现实的方法了。。。

APP首页上面有一个折叠效果的组件,可以拿出手机来试一下,做安卓的同学说那是一个原生的组件CollapsingToolbarLayout,但是我现在还不会封装,想着就模拟一个类似功能的;上方的左右滑动跟随还算能做,但是折叠效果我用了很多种方法都失败了:


**尝试1:**我在scrollview的onscroll里面提交了一个事件“scroll”,由上方折叠组件接受“scroll”事件进行处理,但是这样的动画是真的卡得没办法看;

**尝试2:**还是类似的方法,只不过这次我让折叠组件穿了一个setState的回调函数给scroll,心想这样性能会高一点,然而并没有什么卵用;

**尝试3:**我看了一下手势控制的一块,发现有一个控制当前组件是否处理触摸事件的属性,心血来潮试了一下把两个scrollView放到一起,这样用原生的滑动的话,性能肯定不会差,我们只需要监听他的滚动方向变化就好了;试了一下发现那个属性行不通,每一次接受手势的还是外面的那个scrollview,不知道是不是我自己的问题,希望有心人去temp里面看看 再试一试。

**尝试4:**过了一会儿我又想了个办法,既然上面的方法行不通,那我就用类似的,判定滚动方向后,我就只需要渲染一次,将scrollview转换成静态的view,神不知鬼不觉吗,这个常识还在继续,有结果了我会在这里贴出来。

总结:
1.我费话有点多,写这个东西真的是把我坑死了,可能是思路不对。
2.要让组件重新渲染的消费是极高的,不要想着做一帧一帧的渲染了,行不通。
3.在onScroll事件中执行的事件越简单,频率就越高,如果执行重新渲染等高耗时的操作。会导致事件采集频率降低到一秒三次左右。

Mac "run-ios" Error RCTSRWebSocket.m

/Users/llh/code/react-native/Bilibili-React-Native/node_modules/react-native/Libraries/WebSocket/RCTSRWebSocket.m:494:3: error: 
      ignoring return value of function declared with warn_unused_result
      attribute [-Werror,-Wunused-result]
  SecRandomCopyBytes(kSecRandomDefault, keyBytes.length, keyBytes.mutableBytes);
  ^~~~~~~~~~~~~~~~~~ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/Users/llh/code/react-native/Bilibili-React-Native/node_modules/react-native/Libraries/WebSocket/RCTSRWebSocket.m:1334:5: error: 
      ignoring return value of function declared with warn_unused_result
      attribute [-Werror,-Wunused-result]
    SecRandomCopyBytes(kSecRandomDefault, sizeof(uint32_t), (uint8_t *)mask_key);
    ^~~~~~~~~~~~~~~~~~ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
2 errors generated.
** BUILD FAILED **


The following build commands failed:
    CompileC /Users/llh/code/react-native/Bilibili-React-Native/ios/build/Build/Intermediates/RCTWebSocket.build/Debug-iphonesimulator/RCTWebSocket.build/Objects-normal/x86_64/RCTSRWebSocket.o RCTSRWebSocket.m normal x86_64 objective-c com.apple.compilers.llvm.clang.1_0.compiler
(1 failure)

Mac上运行报错

运行以下命令后:npm install,react-native run-ios,编译成功了,但是xcode模拟器上报错如下:Application reactNative has not been registered. This is either due to a required() error during initialization or failure to call AppRegistry.registerComponent.

xcode8.0 compile error

XCode8.0 编译时报错,错误如下
Ld /Users/lixd/Library/Developer/Xcode/DerivedData/reactNative-dovhoolewyljhsgxpqonkvustyvu/Build/Products/Debug-iphonesimulator/reactNative.app/reactNative normal x86_64
cd /Users/lixd/Documents/github/Bilibili-React-Native/ios
export IPHONEOS_DEPLOYMENT_TARGET=7.0
export PATH="/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/usr/bin:/Applications/Xcode.app/Contents/Developer/usr/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin"
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang -arch x86_64 -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator10.1.sdk -L/Users/lixd/Library/Developer/Xcode/DerivedData/reactNative-dovhoolewyljhsgxpqonkvustyvu/Build/Products/Debug-iphonesimulator -F/Users/lixd/Library/Developer/Xcode/DerivedData/reactNative-dovhoolewyljhsgxpqonkvustyvu/Build/Products/Debug-iphonesimulator -filelist /Users/lixd/Library/Developer/Xcode/DerivedData/reactNative-dovhoolewyljhsgxpqonkvustyvu/Build/Intermediates/reactNative.build/Debug-iphonesimulator/reactNative.build/Objects-normal/x86_64/reactNative.LinkFileList -Xlinker -rpath -Xlinker @executable_path/Frameworks -mios-simulator-version-min=7.0 -Xlinker -object_path_lto -Xlinker /Users/lixd/Library/Developer/Xcode/DerivedData/reactNative-dovhoolewyljhsgxpqonkvustyvu/Build/Intermediates/reactNative.build/Debug-iphonesimulator/reactNative.build/Objects-normal/x86_64/reactNative_lto.o -Xlinker -no_deduplicate -Xlinker -objc_abi_version -Xlinker 2 -fobjc-arc -fobjc-link-runtime -ObjC -lc++ -lReact /Users/lixd/Library/Developer/Xcode/DerivedData/reactNative-dovhoolewyljhsgxpqonkvustyvu/Build/Products/Debug-iphonesimulator/libRCTActionSheet.a /Users/lixd/Library/Developer/Xcode/DerivedData/reactNative-dovhoolewyljhsgxpqonkvustyvu/Build/Products/Debug-iphonesimulator/libRCTGeolocation.a /Users/lixd/Library/Developer/Xcode/DerivedData/reactNative-dovhoolewyljhsgxpqonkvustyvu/Build/Products/Debug-iphonesimulator/libRCTImage.a /Users/lixd/Library/Developer/Xcode/DerivedData/reactNative-dovhoolewyljhsgxpqonkvustyvu/Build/Products/Debug-iphonesimulator/libRCTLinking.a /Users/lixd/Library/Developer/Xcode/DerivedData/reactNative-dovhoolewyljhsgxpqonkvustyvu/Build/Products/Debug-iphonesimulator/libRCTNetwork.a /Users/lixd/Library/Developer/Xcode/DerivedData/reactNative-dovhoolewyljhsgxpqonkvustyvu/Build/Products/Debug-iphonesimulator/libRCTSettings.a /Users/lixd/Library/Developer/Xcode/DerivedData/reactNative-dovhoolewyljhsgxpqonkvustyvu/Build/Products/Debug-iphonesimulator/libRCTText.a /Users/lixd/Library/Developer/Xcode/DerivedData/reactNative-dovhoolewyljhsgxpqonkvustyvu/Build/Products/Debug-iphonesimulator/libRCTVibration.a /Users/lixd/Library/Developer/Xcode/DerivedData/reactNative-dovhoolewyljhsgxpqonkvustyvu/Build/Products/Debug-iphonesimulator/libRCTWebSocket.a -lRNSVG -Xlinker -dependency_info -Xlinker /Users/lixd/Library/Developer/Xcode/DerivedData/reactNative-dovhoolewyljhsgxpqonkvustyvu/Build/Intermediates/reactNative.build/Debug-iphonesimulator/reactNative.build/Objects-normal/x86_64/reactNative_dependency_info.dat -o /Users/lixd/Library/Developer/Xcode/DerivedData/reactNative-dovhoolewyljhsgxpqonkvustyvu/Build/Products/Debug-iphonesimulator/reactNative.app/reactNative

ld: library not found for -lRNSVG
clang: error: linker command failed with exit code 1 (use -v to see invocation)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.