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
mercurylanded
V2EX  ›  iDev

ios里alpha值为0的控件响应

  •  
  •   mercurylanded · Mar 13, 2012 · 5524 views
    This topic created in 5321 days ago, the information mentioned may be changed or developed.
    应客户的蛋疼要求把tabbar上面的元素当做button用,不想手写一个tabbar,所以偷懒在tabbar上面盖了一几个button把alpha值设为0。但是点击之后没效果相当于点到后面的tabbar上面去了,alpha值为0.1的时候还有效的。
    3 replies  •  1970-01-01 08:00:00 +08:00
    ytzong
        1
    ytzong  
       Mar 13, 2012
    拖一个 button
    改 type 为 custom
    再改下宽高就可以了吧
    lex
        2
    lex  
       Mar 13, 2012
    可以建个 UIView,
    userInteractionEnabled = YES
    alpha 不改,默认 1.
    backgroundColor = [UIColor clearColor]
    然后用 drawRectBlock 在里面填充 [[UIColor colorWithWhite:1. alpha:.0001] CGColor]
    laihj
        3
    laihj  
       Mar 13, 2012
    [UIColor clearColor]能用
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Privacy   ·   Solana   ·   981 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 31ms · UTC 17:42 · PVG 01:42 · LAX 10:42 · JFK 13:42
    ♥ Do have faith in what you're doing.