首页
学习
活动
专区
圈层
工具
发布
    • 综合排序
    • 最热优先
    • 最新优先
    时间不限
  • 来自专栏王磊的博客

    React Native顶|底部导航使用小技巧

    React.Component { static navigationOptions = { tabBarLabel: '热点', tabBarIcon: ({ focused, tintColor /res/images/hot.png')} style={{ width: 26, height: 26, tintColor: tintColor }} /res/images/coterie.png')} style={{ width: 26, height: 26, tintColor: tintColor }} /res/images/tool.png')} style={{ width: 26, height: 26, tintColor: tintColor }} /res/images/my.png')} style={{ width: 26, height: 26, tintColor: tintColor }}

    9.4K60发布于 2018-05-08
  • 来自专栏Helloted

    React Native(二):react-navigation

    React.Component { static navigationOptions = { tabBarLabel: 'Home', tabBarIcon: ({ tintColor /imgs/01.png')} style={[styles.icon, {tintColor: tintColor}]} /> ), }; render() React.Component { static navigationOptions = { drawerLabel: 'Home', drawerIcon: ({ tintColor /imgs/01.png')} style={[styles.icon, {tintColor: tintColor}]} /> ), }; render( /imgs/02.png')} style={[styles.icon, {tintColor: tintColor}]} /> ), }; render(

    3K20编辑于 2022-06-07
  • 来自专栏全栈程序员必看

    React Native(四)——顶部以及底部导航栏实现方式

    React.Component { static navigationOptions = { tabBarLabel: '热点', tabBarIcon: ({ focused, tintColor /Images/hot.png')} style={ { width: 26, height: 26, tintColor: tintColor }} /Images/coterie.png')} style={ { width: 26, height: 26, tintColor: tintColor }} /Images/tool.png')} style={ { width: 26, height: 26, tintColor: tintColor }} /Images/my.png')} style={ { width: 26, height: 26, tintColor: tintColor }} /

    4.2K20编辑于 2022-07-20
  • 来自专栏终身学习者

    手把手教你如何自定义 React Native 底部导航栏

    默认选项卡栏将 tintColor 传递给图标组件,因此我们使用它来设置图标颜色。 }) => <Icon name="home" color={tintColor} /> } }, SearchScreen: { screen: SearchScreen, navigationOptions: { tabBarIcon: ({ tintColor }) => <Icon name="search" color={tintColor} / , navigationOptions: { tabBarIcon: ({ tintColor }) => <Icon name="profile" color={tintColor 我们可以使用 renderIcon 函数来渲染正确的图标——通过查看源代码,该函数需要传入一个对象参数: { route, focused, tintColor }。

    9.3K20发布于 2019-04-25
  • 来自专栏Scott_Mr 个人专栏

    React Native 系列(九) -- Tab标签组件

    style:样式 tintColor string: 当前被选中的标签图标的颜色。 unselectedItemTintColor string: 当前没有被选中的标签图标的颜色。 })=>( <CustTabBarItem tintColor={tintColor} focused })=>( <CustTabBarItem tintColor={tintColor} focused })=>( <CustTabBarItem tintColor={tintColor} focused this.props.selectImage : this.props.normalImage} style={{tintColor: this.props.tintColor,

    7.4K90发布于 2018-05-16
  • 来自专栏FinGet前端之路

    react-native之navigation

    screen: Navigation, navigationOptions: { tabBarLabel: '首页', tabBarIcon: ({tintColor /home.png')} style={[{tintColor: tintColor},styles.icon]} /> screen: First, navigationOptions: { tabBarLabel: '第一页', tabBarIcon: ({tintColor /home.png')} style={[{tintColor: tintColor},styles.icon]} /> /home.png')} style={[{tintColor: tintColor},styles.icon]} />

    3.1K50发布于 2019-06-28
  • 来自专栏码客

    iOS各View的属性设置

    false; UINavigationBar(全局设置) Swift示例 let appear = UINavigationBar.appearance(); //设置Item的样式 appear.tintColor : UIFont.systemFontOfSize(18)]; OC示例 UINavigationBar *appear = [UINavigationBar appearance]; appear.tintColor ]; UITabBar(全局设置) OC示例 UITabBar *tabbarAppear = [UITabBar appearance]; tabbarAppear.tintColor self.navigationController.navigationBar.barStyle = UIBarStyle.BlackTranslucent; self.navigationController.navigationBar.tintColor searchBarAppear.translucent = false; searchBarAppear.backgroundColor = UIColor.clearColor(); searchBarAppear.tintColor

    2K20发布于 2019-10-22
  • 来自专栏谦谦君子修罗刀

    react-navigation,刷新你的导航一、属性介绍二、案例

    this.props.selectedImage : this.props.normalImage } style={ { tintColor:this.props.tintColor }) => ( <TabBarItem tintColor={tintColor} focused={focused} }) => ( <TabBarItem tintColor={tintColor} focused={focused} /imgs/ic_like_sel.png')} style={[styles.icon, {tintColor: tintColor}]} /> /imgs/ic_mine_sel.png')} style={[styles.icon, {tintColor: tintColor}]} />

    23K90发布于 2018-05-02
  • 来自专栏岑志军的专栏

    ReactNative-底部TabBar react-native-tab-navigator

    /tab_icon_home@2x.png")} />} renderSelectedIcon={() => <Image style={[styles.icon,{tintColor /tab_icon_home@2x.png")} />} renderSelectedIcon={() => <Image style={[styles.icon,{tintColor tab_icon_destn@2x.png")} />} renderSelectedIcon={() => <Image style={[styles.icon,{tintColor tab_icon_usercenter@2x.png")} />} renderSelectedIcon={() => <Image style={[styles.icon,{tintColor

    963110发布于 2018-05-28
  • 来自专栏汪宇杰博客

    UWP应用中自定义亚克力材质

    AcrylicBrush x:Key="CMapUwpAcrylicBrush" BackgroundSource="HostBackdrop" TintColor TintOpacity="0.4" FallbackColor="{StaticResource SystemAccentColor}"/> 其中,TintColor CMapUwpAcrylicBrush" BackgroundSource="HostBackdrop" TintColor CMapUwpAcrylicBrush" BackgroundSource="HostBackdrop" TintColor

    1K20发布于 2019-07-08
  • 来自专栏编程之旅

    UINavigationBar的用法

    这个一个是默认的,黑色颜色,用于亮色背景,一个是白色用于深色背景 设置返回按钮 有时候我们会发现,我们设置的返回按钮都是蓝色的默认颜色,那么到底该怎么更改这些按钮的颜色呢 设置返回按钮的颜色,只设置tintColor 的颜色就好了 self.navigationController.navigationBar.tintColor = [UIColor whiteColor]; 只设置返回按钮的图片 - (void)goToBack 特别的解释下UIImage的imageWithRenderingMode:方法,参数UIImageRenderingModeAlwaysOriginal 表示总是用原图渲染,如果不这么设置,返回按钮将会显示tintColor target:self action:@selector(goToBack)]; leftButton.tintColor UIControlStateNormal]; [leftButton setTitle:@"返回" forState:UIControlStateNormal]; leftButton.tintColor

    2.5K20发布于 2018-08-30
  • 来自专栏KyXu

    【iOS开发】全局设定 UINavigationBar 的 UI

    TabBar 只有一个,直接在 UITabBarController 的代码里写下面这段就可以 (globalBarTintColor是我自定义的浅海蓝色,后面还会出现) self.tabBar.tintColor -> Bool { // NavigationBar 颜色,全局设定 UINavigationBar.appearance().tintColor = UIColor.whiteColor navigationBar.tintColor = UIColor.whiteColor() 这个按钮的颜色貌似是改不掉的(据我刚刚尝试,是这样的)。

    1K20发布于 2019-04-11
  • 来自专栏iOS逆向与安全

    iOS视图滚动的时候控制导航条标题及公告视图的alpha(显示与隐藏)

    = YES; } } II 更改UIButton的图片颜色 应用场景:比如设计给我们的是一张黑色的返回箭头图.我们某个页面需要弄成白色的话.又不想重新设计一下新的图片 解决方法:修改tintColor 如果按钮是UIButtonTypeSystem类型的,比如修改系统导航栏的barButtonItem,直接设置tintColor即可。 vc.navigationItem.leftBarButtonItem.tintColor = [UIColor whiteColor]; 但是修改自定义按钮的tintColor,需要设置图片的渲染模式为 UIImageRenderingModeAlwaysTemplate,并设置对应的tintColor UIButton *tmpView = [[UIButton alloc]init] QCTNAVicon_left] imageWithRenderingMode:UIImageRenderingModeAlwaysTemplate]; tmpView.tintColor

    2.4K30发布于 2021-07-29
  • 来自专栏向治洪

    React Native导航器之react-navigation使用

    react 节点显示在header左边,例如左按钮 6)style-header的style 7)titleStyle- header的title的style (^__^) 嘻嘻…… 8)tintColor static navigationOptions内 tabBar: { label: '首页', icon: ({tintColor /app/images/home.png')} style={[{tintColor: tintColor},styles.icon]}/>), }, } /app/images/bill.png')} style={[{tintColor: tintColor},styles.icon]}/>), }, } /app/images/me.png')} style={[{tintColor: tintColor},styles.icon]}/>), }, } }

    14.9K70发布于 2018-02-06
  • 来自专栏我和未来有约会

    为UINavigationBar添加自定义背景

    CGContextSetFillColor(context, CGColorGetComponents( [color CGColor])); // CGContextFillRect(context, rect); // self.tintColor "bg.png"]; [img drawInRect:CGRectMake(0, 0, self.frame.size.width, self.frame.size.height)]; self.tintColor

    1K90发布于 2018-01-16
  • 来自专栏h5

    React Native聊天app实例|RN版聊天室

    tintColor : '#999')} ]}></Text> <View style={[GStyle.badge, {position navigationOptions: { tabBarLabel: '通讯录', tabBarIcon: ({focused, tintColor tintColor : '#999')} ]}></Text> </View> ) } navigationOptions: { tabBarLabel: '我', tabBarIcon: ({focused, tintColor tintColor : '#999')} ]}></Text> <View style={[GStyle.badge_dot, {position

    7.4K10发布于 2019-09-01
  • 来自专栏css小迷妹

    iOS实现毛玻璃效果,图片模糊效果的三种方法

    (毛玻璃效果) // 内部方法,核心代码,封装了毛玻璃效果 参数:半径,颜色,色彩饱和度 - (UIImage *)imageBluredWithRadius:(CGFloat)blurRadius tintColor :(UIColor *)tintColor saturationDeltaFactor:(CGFloat)saturationDeltaFactor maskImage:(UIImage *)maskImage , effectImage.CGImage); CGContextRestoreGState(outputContext); } // 添加颜色渲染 if (tintColor { CGContextSaveGState(outputContext); CGContextSetFillColorWithColor(outputContext, tintColor.CGColor

    3.3K10发布于 2021-10-29
  • 来自专栏h5

    taro+react导航条组件/自定义底部Tabbar导航

    static defaultProps = { current: 0, background: '#fff', color: '#999', tintColor render() { const { background, color, tintColor, fixed } = this.props const { updateCurrent tintColor : color}}>{item.icon}</Text> {/* 圆点 */} tintColor : color}}>{item.title}</Text> </View> ))} TabBar from '@components/tabbar' <TabBar current={currentTabIndex} background='#f8f8f8' color='#999' tintColor

    8.5K21发布于 2019-11-27
  • 来自专栏c#开发者

    自定义ios keyboard tool bar代码片段

    prevNext.momentary = YES; _prevNext.segmentedControlStyle = UISegmentedControlStyleBar; _prevNext.tintColor = actionBar.tintColor; [_prevNext addTarget:self action:@selector(handleActionBarPreviousNext:)

    56760发布于 2018-04-12
  • 来自专栏贾鹏辉的技术专栏@CrazyCodeBoy

    『React Navigation 3x系列教程』createDrawerNavigator开发指南

    drawerLabel:侧滑标题; drawerIcon:侧滑的标题图标,这里会回传两个参数: {focused: boolean, tintColor: string}: focused: 表示是否是选中状态; tintColor: 表示选中的颜色; drawerLockMode:指定抽屉的锁定模式。 navigationOptions: { drawerLabel: 'Page4', drawerIcon: ({tintColor : { screen: Page4, navigationOptions: { drawerLabel: 'Page4', drawerIcon: ({tintColor 在上述代码中使用了react-native-vector-icons的矢量图标作为Tab的显示图标,drawerIcon接收一个React 组件,大家可以根据需要进行定制: tintColor: 当前状态下

    9.4K10发布于 2019-12-10
领券