iOS 开发实用技术导航
NSHipster 中文版
› http://nshipster.cn/
cocos2d 开源 2D 游戏引擎
› http://www.cocos2d-iphone.org/
CocoaPods
› http://cocoapods.org/
Google Analytics for Mobile 统计解决方案
› http://code.google.com/mobile/analytics/
WWDC
› https://developer.apple.com/wwdc/
Design Guides and Resources
› https://developer.apple.com/design/
Transcripts of WWDC sessions
› http://asciiwwdc.com
Cocoa with Love
› http://cocoawithlove.com/
Cocoa Dev Central
› http://cocoadevcentral.com/
NSHipster
› http://nshipster.com/
Style Guides
› Google Objective-C Style Guide
› NYTimes Objective-C Style Guide
Useful Tools and Services
› Charles Web Debugging Proxy
› Smore
xuming
V2EX  ›  iDev

很多应用,比如微信,在 UITabBarItem 右上角有一个小红点,注意(不是带数字的小红圈),这个有什么简便的实现方式不

  •  
  •   xuming · Jul 12, 2014 · 14316 views
    This topic created in 4514 days ago, the information mentioned may be changed or developed.
    就是一个小圆点
    9 replies  •  2014-07-16 10:58:47 +08:00
    xuan_lengyue
    xuan_lengyue
    Jul 12, 2014
    1
    给 TabBar 加 subview 即可,很简单。
    fangzhzh
    fangzhzh
    Jul 12, 2014
    2
    加个imageiew?
    hoogle
    hoogle
    Jul 12, 2014 via iPhone
    3
    badge = @""
    hoogle
    hoogle
    Jul 12, 2014 via iPhone
    4
    自定义大小、形状、颜色的话可以考虑AddSubview到bar或者生成一个带点的barItem image
    xuming
    xuming
    OP
    Jul 13, 2014 via iPhone
    5
    badge 生成的太大,生成带点的图片不通用,看来AddSubview比较可行
    79bxh9b
    79bxh9b
    Jul 13, 2014
    6
    UITabBarItem不属于uiview吧,能加subview?
    dopcn
    dopcn
    Jul 15, 2014
    7
    UITabBarItem 在 UITabBar 上,加在 bar 上吧
    skingtree
    skingtree
    Jul 16, 2014
    8
    badgeValue
    Text that is displayed in the upper-right corner of the item with a surrounding red oval.

    @property(nonatomic, copy) NSString *badgeValue

    -- UITabBarItem
    skingtree
    skingtree
    Jul 16, 2014
    9
    要不自己加个uiview,setBackgroundColor,再设置一下layer.cornerRadius
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Privacy   ·   Solana   ·   2030 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 32ms · UTC 07:10 · PVG 15:10 · LAX 23:10 · JFK 02:10
    ♥ Do have faith in what you're doing.