- ·上一篇文章:CrossApp的MVC模式
- ·下一篇文章:CrossApp内存管理
CrossApp项目结构及入口
个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);}
CrossApp项目结构及入口