PullToRefreshView icon indicating copy to clipboard operation
PullToRefreshView copied to clipboard

Fixed the statusLabel not showing and added init state

Open yager99 opened this issue 13 years ago • 0 comments

////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////

  • (id)initWithScrollView:(UIScrollView *)scroll { CGRect frame = CGRectMake(0.0f, 0.0f - scroll.bounds.size.height, scroll.bounds.size.width, scroll.bounds.size.height);

    if ((self = [super initWithFrame:frame])) {

    //...................

    statusLabel = [[UILabel alloc] init];
    //add by yager
    statusLabel.frame = CGRectMake(0.0f, frame.size.height - 48.0f, self.frame.size.width, 20.0f);
    statusLabel.autoresizingMask = UIViewAutoresizingFlexibleWidth;
    statusLabel.font = [UIFont systemFontOfSize:12.f];
    statusLabel.textColor = kPullToRefreshViewTitleColor;
    statusLabel.shadowColor = [UIColor colorWithWhite:0.9f alpha:1.0f];
    statusLabel.shadowOffset = CGSizeMake(0.0f, 1.0f);
    statusLabel.backgroundColor = [UIColor clearColor];
    statusLabel.textAlignment = UITextAlignmentCenter;
    [self addSubview:statusLabel];
    

    //...................

    //add by yager
    [self setState:kPullToRefreshViewStateNormal];
    

    }

    return self; }

////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////

yager99 avatar Dec 19 '12 07:12 yager99