UIBarButtonItem *doneitem=[[[UIBarButtonItem alloc]initWithBarButtonSystemItem:UIBarButtonSystemItemDone target:self action:@selector(donePressed:)]autorelease];
self.navigationItem.rightBarButtonItem=doneitem;
Run Code Online (Sandbox Code Playgroud)
这是我的应用程序的代码,我需要在此按钮上添加图像?
请帮我.
我该怎么用UIScrollView
?请给我一个简单的例子,一个滚动图像?
我正在尝试集成 apollo iOS 客户端,在完成所有步骤后,我在运行构建阶段脚本时收到错误。所以一共有三个错误。一个是
请注意,这是在node_modules/@oclif 内部发生的。
Error initializing Apollo GraphQL project "Unnamed Project": Error: Error in "Loading schema for Unnamed Project": TypeError: Cannot read property 'reduce' of undefined
无法在android的webview上显示浮动按钮。iOS工作正常,在Android上不显示。
渲染功能:
<View style={{ flex: 1}}>
<View style={{position:'absolute',right:0,marginTop:90,marginRight:10,zIndex:1,height:50,width:50}}>
<TouchableHighlight style={styles.addButton}
underlayColor='#ff7043' onPress={()=>{console.log('pressed')}}>
<Text style={{fontSize: 50, color: 'black'}}>+</Text>
</TouchableHighlight>
</View>
<WebView
source={require('./index.html')}
style={{marginTop:0}}
scalesPageToFit={Platform.OS !== 'ios'}
onMessage={this.onMessage}
postMessage={"Hello from RN"}
/>
</View>
Run Code Online (Sandbox Code Playgroud)
CSS:
const styles = StyleSheet.create({
addButton: {
backgroundColor: '#ff5722',
borderColor: '#ff5722',
borderWidth: 1,
height: 100,
width: 100,
borderRadius: 50,
alignItems: 'center',
justifyContent: 'center',
position: 'absolute',
bottom: 20,
right:20,
shadowColor: "#000000",
shadowOpacity: 0.8,
shadowRadius: 2,
shadowOffset: {
height: 1,
width: 0
}
}
});
Run Code Online (Sandbox Code Playgroud)
如何在android的Web视图上显示按钮?
iphone ×2
objective-c ×2
android ×1
apollo ×1
apollo-ios ×1
graphql ×1
ios ×1
ios4 ×1
react-native ×1
reactjs ×1
swift ×1
uiscrollview ×1
xcode ×1