首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > 移动开发 > 移动开发 >

ScrollView indicators 一直展示

2013-03-26 
ScrollViewindicators 一直显示需要自己设置一个tag#define noDisableVerticalScrollTag 836913#define no

ScrollView indicators 一直显示

需要自己设置一个tag

#define noDisableVerticalScrollTag 836913#define noDisableHorizontalScrollTag 836914@implementation UIImageView (ForScrollView) - (void) setAlpha:(float)alpha {        if (self.superview.tag == noDisableVerticalScrollTag) {        if (alpha == 0 && self.autoresizingMask == UIViewAutoresizingFlexibleLeftMargin) {            if (self.frame.size.width < 10 && self.frame.size.height > self.frame.size.width) {                UIScrollView *sc = (UIScrollView*)self.superview;                if (sc.frame.size.height < sc.contentSize.height) {                    return;                }            }        }    }        if (self.superview.tag == noDisableHorizontalScrollTag) {        if (alpha == 0 && self.autoresizingMask == UIViewAutoresizingFlexibleTopMargin) {            if (self.frame.size.height < 10 && self.frame.size.height < self.frame.size.width) {                UIScrollView *sc = (UIScrollView*)self.superview;                if (sc.frame.size.width < sc.contentSize.width) {                    return;                }            }        }    }        [super setAlpha:alpha];}@end

?

热点排行