• 改变uilable uibutton等的字体颜色、大小。


    -(void)changeButtonFont:(UIView *)aView withColorFlag:(int) i

    {

        

        if ([aView isKindOfClass:[UILabel class]]) {

            UILabel *lb = (UILabel    *)aView;

            if (i==1) {

                [lb setTextColor:[UIColor whiteColor]];

            }else {

              [lb setFont:[UIFontsystemFontOfSize:13]];  

               [lb setTextColor:[UIColor blackColor]];

             }

            

            [lb setTextAlignment:UITextAlignmentCenter];

            [lb setFont:[UIFontsystemFontOfSize:13]];

            //            [lb setBackgroundColor:[UIColor whiteColor]];

        }

        NSArray *na = [aView subviews];

        NSEnumerator *ne = [na objectEnumerator];

        UIView *subView;

        while (subView = [ne nextObject]) {

            [selfchangeButtonFont:subView withColorFlag:i];

        }

        

        

  • 相关阅读:
    py 5.11
    py 5.10
    py 5.9
    py 5.8
    python 5.7
    python 5.4
    python 5.3
    python 5.2
    python 4.28
    python 4.27
  • 原文地址:https://www.cnblogs.com/sgdkg/p/2715511.html
Copyright © 2020-2023  润新知