当前位置:K88软件开发文章中心编程语言APP编程CrossApp → 文章内容

CrossApp项目结构及入口

减小字体 增大字体 作者:佚名  来源:网上搜集  发布时间:2019-1-23 13:51:28

个loop时被释放) this->getView()->addSubview(imageView); //设置一个文本 CALabel* label = CALabel::createWithCenter(DRect(winRect.size.width*0.5, winRect.size.height*0.5-270, winRect.size.width, 200)); //文本水平方向中间对其 label->setTextAlignment(CATextAlignmentCenter); //文本竖直方向中间对其 label->setVerticalTextAlignmet(CAVerticalTextAlignmentCenter); //设置字体大小(CROSSAPP_ADPTATION_RATIO是用于适配的系数) label->setFontSize(72 * CROSSAPP_ADPTATION_RATIO); //设置文本内容 label->setText("Hello World!"); //设置文本颜色 label->setColor(CAColor_white); //添加到屏幕并设置z轴 this->getView()->insertSubview(label, 1);}

上一页  [1] [2] 


CrossApp项目结构及入口