1.判断是否已经引入某个类
#if __has_include(<React/RCTViewManager.h>)
// React Native >= 0.40
#import <React/UIView+React.h>
#else
// React Native <= 0.39
#import "UIView+React.h"
#endif
2.iOS 绘制曲线
UIResponder 的touch moved方法中,使用点绘制贝塞尔曲线,在touch ended方法中,使用UIImage UIGraphicsGetImageFromCurrentImageContext 将贝塞尔曲线绘制成图片
网友评论