本文整理汇总了C++中CAScale9ImageView::setFrame方法的典型用法代码示例。如果您正苦于以下问题:C++ CAScale9ImageView::setFrame方法的具体用法?C++ CAScale9ImageView::setFrame怎么用?C++ CAScale9ImageView::setFrame使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类CAScale9ImageView
的用法示例。
在下文中一共展示了CAScale9ImageView::setFrame方法的8个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: viewDidLoad
void SessionsViewController::viewDidLoad()
{
// Do any additional setup after loading the view from its nib.
m_winSize = this->getView()->getBounds().size;
CAScale9ImageView* sView = CAScale9ImageView::createWithImage(CAImage::create("common/sky_bg.png"));
sView->setFrame(DRect((0), (0), m_winSize.width, (120)));
this->getView()->addSubview(sView);
CAButton* button = CAButton::createWithFrame(DRect((0), (20), (100), (100)), CAButtonTypeCustom);
CAImageView* imageView = CAImageView::createWithImage(CAImage::create("common/nav_search.png"));
imageView->setImageViewScaleType(CAImageViewScaleTypeFitImageXY);
button->setBackgroundViewForState(CAControlStateAll, imageView);
button->addTarget(this, CAControl_selector(SessionsViewController::buttonCallBack), CAControlEventTouchUpInSide);
button->setTag(20);
this->getView()->addSubview(button);
FSegmentView* seg = FSegmentView::createWithFrame(DRect(m_winSize.width - 240, 45, 200, 50), 2);
seg->addTarget(this, CAControl_selector(SessionsViewController::buttonCallBack), CAControlEventTouchUpInSide);
imageView = CAImageView::createWithImage(CAImage::create("common/nav_time.png"));
seg->setItemBackgroundImage(imageView, 0);
imageView = CAImageView::createWithImage(CAImage::create("common/nav_type.png"));
seg->setItemBackgroundImage(imageView, 1);
seg->setTag(200, 0);
seg->setTag(201, 1);
this->getView()->addSubview(seg);
m_navType = 0;
m_navTimeType = 0;
m_navFormatType = 0;
CALabel* label = CALabel::createWithCenter(DRect(m_winSize.width / 2, (75), m_winSize.width, (50)));
label->setTextAlignment(CATextAlignmentCenter);
label->setColor(CAColor_white);
label->setFontSize(SAP_TITLE_FONT_SIZE);
label->setText("Agenda");
label->setFontName(SAP_FONT_ARIAL);
sView->addSubview(label);
if (m_msg->empty())
{
requestMsg();
{
p_pLoading = CAActivityIndicatorView::createWithCenter(DRect(m_winSize.width / 2, m_winSize.height / 2, 50, 50));
this->getView()->insertSubview(p_pLoading, CAWindowZOderTop);
p_pLoading->setLoadingMinTime(0.5f);
p_pLoading->setTargetOnCancel(this, callfunc_selector(SessionsViewController::initMsgTableView));
}
}
else
{
initMsgTableView();
}
CCLog("%f", CAApplication::getApplication()->getWinSize().width);
}
示例2: init
bool DMChartsCell::init(const char* reuseIdentifier, const CCSize& cellSize)
{
if (!CATableViewCell::initWithReuseIdentifier(reuseIdentifier)) {
return false;
}
//名次
m_pPosition = CAImageView::createWithFrame(CCRect(_px(30), _px(108), _px(60), _px(60)));
m_pPosition->setImage(CAImage::create("dm_resource/charts/c1x.png"));
this->addSubview(m_pPosition);
//图片
CCRect mImgR = CCRect(_px(110), _px(30), _px(160), _px(212));
CCRect mImgRealR = CCRect(_px(112), _px(32), _px(156), _px(208));
m_pMainImg = CommonUrlImageView::createWithFrame(mImgRealR);
CAScale9ImageView *bacImg = CAScale9ImageView::createWithImage(CAImage::create("dm_resource/catalog/book_bg.png"));
// m_pMainImg->setImage(CAImage::create("dm_resource/1.png"));
bacImg->setFrame(mImgR);
this->addSubview(bacImg);
this->addSubview(m_pMainImg);
//漫画名
CCRect nameR = CCRect(_px(300), _px(30), cellSize.width-_px(300)-_px(30), _px(40));
m_pName = CALabel::createWithFrame(nameR);
m_pName->setFontSize(_px(30));
m_pName->setColor(ccc4(100, 100, 100, 255));
m_pName->setText("名称:");
this->addSubview(m_pName);
float cfSize = _px(24);
CAColor4B color = ccc4(153, 153, 153, 255);
//作者
m_pAuthor = CALabel::createWithFrame(CCRect(nameR.origin.x, nameR.origin.y+nameR.size.height+_px(20), nameR.size.width, _px(35)));
m_pAuthor->setFontSize(cfSize);
m_pAuthor->setColor(color);
m_pAuthor->setText("作者:");
this->addSubview(m_pAuthor);
//题材
m_pClass = CALabel::createWithFrame(CCRect(nameR.origin.x, m_pAuthor->getFrame().origin.y+cfSize+_px(15), nameR.size.width, _px(35)));
m_pClass->setFontSize(cfSize);
m_pClass->setColor(color);
m_pClass->setText("题材:");
this->addSubview(m_pClass);
//最新收录
m_pLastWorks = CALabel::createWithFrame(CCRect(nameR.origin.x, m_pClass->getFrame().origin.y+cfSize+_px(15), nameR.size.width, _px(80)));
m_pLastWorks->setFontSize(cfSize);
m_pLastWorks->setColor(color);
m_pLastWorks->setNumberOfLine(2);
m_pLastWorks->setText("最新收录:...");
this->addSubview(m_pLastWorks);
return true;
}
示例3: viewDidLoad
void SessionsViewController::viewDidLoad()
{
// Do any additional setup after loading the view from its nib.
m_winSize = this->getView()->getBounds().size;
CAScale9ImageView* sView = CAScale9ImageView::createWithImage(CAImage::create("common/sky_bg.png"));
sView->setFrame(DRect(_px(0), _px(0), m_winSize.width, _px(120)));
this->getView()->addSubview(sView);
CAButton* button = CAButton::createWithFrame(DRect(_px(20), _px(20), _px(100), _px(100)), CAButtonTypeCustom);
CAImageView* imageView = CAImageView::createWithImage(CAImage::create("main/nav_notification.png"));
imageView->setImageViewScaleType(CAImageViewScaleTypeFitImageXY);
button->setBackGroundViewForState(CAControlStateAll, imageView);
button->addTarget(this, CAControl_selector(SessionsViewController::buttonCallBack), CAControlEventTouchUpInSide);
button->setTag(20);
this->getView()->addSubview(button);
m_timeNoticeImageView = CAImageView::createWithFrame(DRect(_px(60), _px(30), _px(10), _px(10)));
m_timeNoticeImageView->setImage(CAImage::create("common/reddot.png"));
button->addSubview(m_timeNoticeImageView);
button = CAButton::createWithFrame(DRect(m_winSize.width - _px(120), _px(20), _px(100), _px(100)), CAButtonTypeCustom);
imageView = CAImageView::createWithImage(CAImage::create("main/nav_prize.png"));
imageView->setImageViewScaleType(CAImageViewScaleTypeFitImageXY);
button->setBackGroundViewForState(CAControlStateAll, imageView);
button->addTarget(this, CAControl_selector(SessionsViewController::buttonCallBack), CAControlEventTouchUpInSide);
button->setTag(30);
this->getView()->addSubview(button);
CALabel* label = CALabel::createWithCenter(DRect(m_winSize.width / 2, _px(70), m_winSize.width, _px(40)));
label->setTextAlignment(CATextAlignmentCenter);
label->setColor(CAColor_white);
label->setFontSize(_px(40));
label->setText("Agenda");
label->setFontName("fonts/arial.ttf");
sView->addSubview(label);
if (m_msg.empty())
{
requestMsg();
}
else
{
this->initMsgTableView();
}
CCLog("%f", CAApplication::getApplication()->getWinSize().width);
}
示例4: viewDidLoad
void NoticeDetailViewController::viewDidLoad()
{
// Do any additional setup after loading the view from its nib.
m_winSize = this->getView()->getBounds().size;
CAScale9ImageView* sView = CAScale9ImageView::createWithImage(CAImage::create("common/sky_bg.png"));
sView->setFrame(DRect((0), (0), m_winSize.width, (120)));
this->getView()->addSubview(sView);
CAButton* button = CAButton::createWithFrame(DRect((0), (20), (100), (100)), CAButtonTypeCustom);
CAImageView* imageView = CAImageView::createWithImage(CAImage::create("common/nav_back.png"));
imageView->setImageViewScaleType(CAImageViewScaleTypeFitImageXY);
imageView->setFrame(DRect((20), (20), (80), (80)));
button->setBackgroundViewForState(CAControlStateAll, imageView);
button->addTarget(this, CAControl_selector(NoticeDetailViewController::buttonCallBack), CAControlEventTouchUpInSide);
button->setTag(20);
sView->addSubview(button);
CALabel* label = CALabel::createWithCenter(DRect(m_winSize.width / 2, (70), m_winSize.width, (50)));
label->setTextAlignment(CATextAlignmentCenter);
label->setColor(CAColor_white);
label->setTouchEnabled(false);
label->setFontSize((40));
label->setText("Notice");
label->setFontName(SAP_FONT_ARIAL);
sView->addSubview(label);
label = CALabel::createWithFrame(DRect(0, (200), m_winSize.width, (60)));
label->setTextAlignment(CATextAlignmentCenter);
label->setColor(CAColor_gray);
label->setTouchEnabled(false);
label->setFontSize((40));
label->setText(m_title);
label->setFontName(SAP_FONT_ARIAL);
this->getView()->addSubview(label);
label = CALabel::createWithFrame(DRect(40, (300), m_winSize.width - 80, (800)));
label->setTextAlignment(CATextAlignmentLeft);
label->setColor(CAColor_gray);
label->setTouchEnabled(false);
label->setFontSize((30));
label->setText(m_detail);
label->setFontName(SAP_FONT_ARIAL);
this->getView()->addSubview(label);
CCLog("%f", CAApplication::getApplication()->getWinSize().width);
}
示例5: viewDidLoad
void SiteViewController::viewDidLoad()
{
// Do any additional setup after loading the view from its nib.
m_winSize = this->getView()->getBounds().size;
CAScale9ImageView* tabBg = CAScale9ImageView::createWithImage(CAImage::create("common/yellow_bg.png"));
tabBg->setCapInsets(DRect(1, 1, 1, 1));
tabBg->setFrame(DRect((0), (0), m_winSize.width, (150)));
this->getView()->addSubview(tabBg);
CAButton* button = CAButton::createWithFrame(DRect((0), (20), (100), (100)), CAButtonTypeCustom);
CAImageView* imageView = CAImageView::createWithImage(CAImage::create("common/nav_back.png"));
imageView->setImageViewScaleType(CAImageViewScaleTypeFitImageXY);
imageView->setFrame(DRect((20), (20), (80), (80)));
button->setBackgroundViewForState(CAControlStateAll, imageView);
button->addTarget(this, CAControl_selector(SiteViewController::buttonCallBack), CAControlEventTouchUpInSide);
button->setTag(20);
this->getView()->addSubview(button);
CALabel* mc = CALabel::createWithFrame(DRect((120), (62), (200), (50)));
mc->setFontSize((40));
mc->setText("Site");
mc->setColor(CAColor_white);
mc->setFontName(SAP_FONT_ARIAL);
this->getView()->addSubview(mc);
imageView = CAImageView::createWithFrame(DRect(0, (150), m_winSize.width, m_winSize.height - (150)));
imageView->setImageViewScaleType(CAImageViewScaleTypeFitImageCrop);
imageView->setImage(CAImage::create("common/site_map.png"));
this->getView()->addSubview(imageView);
button = CAButton::createWithFrame(DRect(m_winSize.width - 100, (50), (50), (50)), CAButtonTypeRoundedRect);
imageView = CAImageView::createWithImage(CAImage::create("common/share_btn.png"));
imageView->setImageViewScaleType(CAImageViewScaleTypeFitViewByHorizontal);
button->setTag(200);
button->setBackgroundViewForState(CAControlStateAll, imageView);
button->addTarget(this, CAControl_selector(SiteViewController::buttonCallBack), CAControlEventTouchUpInSide);
this->getView()->addSubview(button);
requestMsg();
m_pLoading = CAActivityIndicatorView::createWithCenter(DRect(m_winSize.width / 2, m_winSize.height / 2, 50, 50));
m_pLoading->setLoadingMinTime(0.5f);
this->getView()->addSubview(m_pLoading);
CCLog("%f", CAApplication::getApplication()->getWinSize().width);
}
示例6: viewDidLoad
void MainViewController::viewDidLoad()
{
// Do any additional setup after loading the view from its nib.
m_winSize = this->getView()->getBounds().size;
// header
CAScale9ImageView* header = CAScale9ImageView::createWithImage(CAImage::create("common/sky_bg.png"));
if (header) {
header->setFrame(DRect((0), (0), m_winSize.width, (120)));
header->setTouchEnabled(false);
this->getView()->addSubview(header);
// title lable
CALabel* label = CALabel::createWithCenter(DRect(m_winSize.width / 2, (80), m_winSize.width, (50)));
if (label) {
label->setTextAlignment(CATextAlignmentCenter);
label->setColor(CAColor_white);
label->setFontSize(SAP_TITLE_FONT_SIZE);
label->setText("SAP d-kom");
label->setFontName(SAP_FONT_ARIAL);
label->setTouchEnabled(false);
header->addSubview(label);
}
}
// left notification button
CAButton* button = CAButton::createWithFrame(DRect((0), (20), (100), (100)), CAButtonTypeCustom);
if (button) {
button->addTarget(this, CAControl_selector(MainViewController::buttonCallBack), CAControlEventTouchUpInSide);
button->setTag(20);
this->getView()->addSubview(button);
CAImageView* imageView = CAImageView::createWithImage(CAImage::create("main/nav_notification.png"));
if (imageView) {
imageView->setImageViewScaleType(CAImageViewScaleTypeFitImageXY);
button->setBackGroundViewForState(CAControlStateAll, imageView);
}
m_timeNoticeImageView = CAImageView::createWithFrame(DRect((60), (30), (20), (20)));
if (m_timeNoticeImageView) {
m_timeNoticeImageView->setImage(CAImage::create("common/reddot.png"));
button->addSubview(m_timeNoticeImageView);
}
//refreshNoticeRedPoint();
}
// notification alert point
/*
// right survey button
button = CAButton::createWithFrame(DRect(m_winSize.width - (100), (20), (100), (100)), CAButtonTypeCustom);
if (button) {
button->addTarget(this, CAControl_selector(MainViewController::buttonCallBack), CAControlEventTouchUpInSide);
button->setTag(30);
this->getView()->addSubview(button);
CAImageView* imageView = CAImageView::createWithImage(CAImage::create("main/nav_survey.png"));
if (imageView) {
imageView->setImageViewScaleType(CAImageViewScaleTypeFitImageXY);
button->setBackgroundViewForState(CAControlStateAll, imageView);
}
}
// survey lable
CALabel * surveylable = CALabel::createWithFrame(DRect(m_winSize.width - (75), (100), (100), (25)));
if (surveylable) {
surveylable->setTextAlignment(CATextAlignmentLeft);
surveylable->setColor(CAColor_white);
surveylable->setFontSize(15);
surveylable->setText("Survey");
surveylable->setFontName(SAP_FONT_ARIAL);
surveylable->setTouchEnabled(false);
this->getView()->addSubview(surveylable);
}
*/
int pageViewHeight = m_winSize.height * 0.3;
int butViewHeight = m_winSize.height * 0.15;
int headerHeight = (120);
int buttitleHeight = (40);
/*
// Page view
if (!m_pageView)
{
m_pageView = CAPageView::createWithFrame(DRect(0, headerHeight, m_winSize.width, pageViewHeight), CAPageViewDirectionHorizontal);
if (m_pageView) {
m_pageView->setPageViewDelegate(this);
m_pageView->setTouchEnabled(true);
CAVector<CAView* > viewList;
for (int i = 0; i<m_page.size(); i++)
{
CommonUrlImageView* temImage = CommonUrlImageView::createWithFrame(DRect(0, (0), m_winSize.width, pageViewHeight - headerHeight));
temImage->setImageViewScaleType(CAImageViewScaleTypeFitImageCrop);
temImage->setImage(CAImage::create("common/bg.png"));
temImage->setUrl(m_page[i].m_imageUrl);
temImage->setTouchEnabled(false);
viewList.pushBack(temImage);
}
//.........这里部分代码省略.........
示例7: listViewCellAtIndex
CAListViewCell* SessionsViewController::listViewCellAtIndex(CAListView *listView, const DSize& cellSize, unsigned int index)
{
CAListViewCell* cell = NULL;
if (listView->getTag() == 1)
{
DSize _size = cellSize;
cell = (CAListViewCell*)listView->dequeueReusableCellWithIdentifier("ListViewCell");
if (!cell)
{
cell = CAListViewCell::create("ListViewCell");
cell->setColor(ccc4(0xEB, 0xEB, 0xEB, 0xff));
CALabel* test = CALabel::createWithCenter(DRect(_size.width/2,
_size.height/2,
_size.width,
_size.height));
test->setTextAlignment(CATextAlignmentCenter);
test->setVerticalTextAlignmet(CAVerticalTextAlignmentCenter);
test->setFontSize((28));
test->setTag(100);
CAScale9ImageView* sView = CAScale9ImageView::createWithImage(CAImage::create("common/gray_bg.png"));
sView->setFrame(DRect((0), (0), _size.width, _size.height));
cell->setBackgroundView(sView);
cell->addSubview(test);
}
CALabel* test = (CALabel*)cell->getSubviewByTag(100);
if (m_timeTblId == index)
test->setColor(CAColor_white); // ccc4(0x96, 0x96, 0x96, 255)
else
test->setColor(SAP_GRAY);
if (index == 0)
{
test->setText("All");
}
else
{
test->setText(crossapp_format_string("%2d:00", index + 8));
}
}
/*
else if(listView->getTag() == 2)
{
DSize _size = cellSize;
cell = (CAListViewCell*)listView->dequeueReusableCellWithIdentifier("ListViewCell");
if (!cell)
{
cell = CAListViewCell::create("ListViewCell");
CAButton* button = CAButton::createWithFrame(DRect((20), (20), (120), (40)), CAButtonTypeCustom);
CAScale9ImageView* sView = CAScale9ImageView::createWithFrame(DRect((0), (0), (120), (40)));
sView->setImage(CAImage::create("common/seggreen_bg.png"));
sView->setTouchEnabled(false);
button->addSubview(sView);
//button->setBackgroundViewForState(CAControlStateAll, sView);
sView = CAScale9ImageView::createWithFrame(DRect((0), (0), (120), (40)));
sView->setImage(CAImage::create("common/seggreen_bg.png"));
sView->setColor(ccc4(0x86, 0xBD, 0x45, 0xff));
button->setBackgroundViewForState(CAControlStateSelected, sView);
button->setTitleForState(CAControlStateAll, filterItem[index * 2]);
button->setTitleColorForState(CAControlStateAll, ccc4(0xA0, 0xA0, 0xA0, 0xA0));
button->setTitleFontSize((20));
button->setAllowsSelected(true);
button->addTarget(this, CAControl_selector(SessionsViewController::buttonCallBack), CAControlEventTouchUpInSide);
button->setTag(310 + index * 2);
//m_listButton[index * 2] = button;
cell->addSubview(button);
button = CAButton::createWithFrame(DRect((20), (70), (120), (40)), CAButtonTypeCustom);
sView = CAScale9ImageView::createWithFrame(DRect((0), (0), (120), (40)));
sView->setImage(CAImage::create("common/seggreen_bg.png"));
sView->setTouchEnabled(false);
button->addSubview(sView);
//button->setBackgroundViewForState(CAControlStateAll, sView);
//button->addSubview(sView);
//button->setBackgroundViewForState(CAControlStateAll, sView);
sView = CAScale9ImageView::createWithFrame(DRect((0), (0), (120), (40)));
sView->setImage(CAImage::create("common/btn_round.png"));
sView->setColor(ccc4(0x86, 0xBD, 0x45, 0xff));
button->setBackgroundViewForState(CAControlStateSelected, sView);
button->setTitleForState(CAControlStateAll, filterItem[index * 2 + 1]);
button->setTitleColorForState(CAControlStateAll, CAColor_gray);
button->setTitleFontSize((20));
button->setAllowsSelected(true);
button->addTarget(this, CAControl_selector(SessionsViewController::buttonCallBack), CAControlEventTouchUpInSide);
button->setTag(310 + index * 2 + 1);
//m_listButton[index * 2 + 1] = button;
cell->addSubview(button);
//sView = CAScale9ImageView::createWithImage(CAImage::create("common/gray_bg.png"));
//sView->setFrame(DRect((0), (0), _size.width, _size.height));
//sView->setColor(CAColor_clear);
//cell->setAlpha(0);
//cell->setBackgroundView(sView);
}
}*/
return cell;
}
示例8: initMsgTableView
void SessionsViewController::initMsgTableView()
{
if (m_msg->empty())
{
showAlert();
return;
}
if (m_msgTableView == NULL)
{
m_listView = CAListView::createWithFrame(DRect(0,(120),m_winSize.width,(60)));
m_listView->setListViewDelegate(this);
m_listView->setListViewDataSource(this);
m_listView->setAllowsSelection(true);
m_listView->setAllowsMultipleSelection(false);
m_listView->setListViewOrientation(CAListViewOrientationHorizontal);
m_listView->setShowsScrollIndicators(false);
m_listView->setSeparatorColor(ccc4(0xf6, 0xf6, 0xf6, 0xff));
m_listView->setBackgroundImage(CAImage::create("common/gray_bg.png"));
m_listView->setTag(1);
//m_listView->setc
this->getView()->addSubview(m_listView);
m_msgTableView = CATableView::createWithFrame(DRect(0, (180), m_winSize.width, m_winSize.height - (180)));
m_msgTableView->setTableViewDataSource(this);
m_msgTableView->setTableViewDelegate(this);
m_msgTableView->setScrollViewDelegate(this);
m_msgTableView->setAllowsSelection(true);
m_msgTableView->setSeparatorColor(ccc4(200, 200, 200, 80));
//m_msgTableView->setSeparatorViewHeight((2));
this->getView()->addSubview(m_msgTableView);
CAPullToRefreshView *refreshDiscount = CAPullToRefreshView::create(CAPullToRefreshView::CAPullToRefreshTypeHeader);
refreshDiscount->setLabelColor(CAColor_black);
m_msgTableView->setHeaderRefreshView(refreshDiscount);
m_filterView = CAView::createWithFrame(DRect(0, (120), m_winSize.width, (60)));
CAScale9ImageView* imageView = CAScale9ImageView::createWithImage(CAImage::create("common/gray_bg.png"));
imageView->setFrame(DRect(0, 0, m_winSize.width, (60)));
m_filterView->addSubview(imageView);
this->getView()->addSubview(m_filterView);
m_filterViewVec.push_back(m_filterView);
for (int i = 0; i < 2; i++)
{
int cnt = 0;
if (i == 0) {
cnt = TrackNum;
} else if (i == 1) {
cnt = FormatNum;
}
m_filterBtn[i] = CAButton::createWithFrame(DRect(i * m_winSize.width / 2, 0, m_winSize.width / 2, (60)), CAButtonTypeCustom);
m_filterBtn[i]->setTitleForState(CAControlStateAll, filterItem[i]);
m_filterBtn[i]->setTitleFontName(SAP_FONT_ARIAL);
m_filterBtn[i]->setTitleFontSize((30));
m_filterBtn[i]->setTitleColorForState(CAControlStateAll, CAColor_gray);
m_filterBtn[i]->addTarget(this, CAControl_selector(SessionsViewController::buttonCallBack), CAControlEventTouchUpInSide);
m_filterBtn[i]->setTag(300 + i);
m_filterBtn[i]->setAllowsSelected(true);
m_filterView->addSubview(m_filterBtn[i]);
m_downView[i] = CAView::createWithFrame(DRect(i * m_winSize.width / 2, (180), m_winSize.width / 2, (50) * cnt + (20)));
CAScale9ImageView* imageView = CAScale9ImageView::createWithImage(CAImage::create("common/gray_bg.png"));
imageView->setFrame(DRect(0, 0, m_winSize.width / 2, (50) * cnt + (20)));
m_downView[i]->addSubview(imageView);
this->getView()->addSubview(m_downView[i]);
m_filterViewVec.push_back(m_downView[i]);
}
for (int i = 0; i < m_filterViewVec.size(); i++)
{
m_filterViewVec[i]->setVisible(false);
}
for (int i = 0; i < TrackNum; i++)
{
CAButton* button = CAButton::createWithFrame(DRect((20), (50) * i, m_winSize.width / 2 - (40), (50)), CAButtonTypeCustom);
button->setTitleForState(CAControlStateAll, trackFilterItem[i]);
button->setTitleFontName(SAP_FONT_ARIAL);
button->setTitleColorForState(CAControlStateAll, CAColor_gray);
button->setTitleColorForState(CAControlStateSelected, CAColor_white);
button->setTitleFontSize((27));
button->setAllowsSelected(true);
//CAImageView* imageView = CAImageView::createWithImage(CAImage::create("common/white_bg.png"));
//button->setBackgroundViewForState(CAControlStateAll, imageView);
CAImageView* imageView = CAImageView::createWithImage(CAImage::create("common/sky_bg.png"));
button->setBackgroundViewForState(CAControlStateSelected, imageView);
button->addTarget(this, CAControl_selector(SessionsViewController::buttonCallBack), CAControlEventTouchUpInSide);
button->setTag(400 + i);
m_downView[0]->addSubview(button);
m_trackButtonVec.push_back(button);
}
for (int i = 0; i < FormatNum; i++)
{
CAButton* button = CAButton::createWithFrame(DRect((20), (50) * i, m_winSize.width / 2 - (40), (50)), CAButtonTypeCustom);
button->setTitleForState(CAControlStateAll, formatFilterItem[i]);
button->setTitleFontName(SAP_FONT_ARIAL);
button->setTitleColorForState(CAControlStateAll, CAColor_gray);
button->setTitleColorForState(CAControlStateSelected, CAColor_white);
//.........这里部分代码省略.........