zoukankan      html  css  js  c++  java
  • 调整导航按钮的布局

    HPTopImgButton *topImgBtn = [[HPTopImgButton alloc] initWithFrame:CGRectMake(0, 0, 44, 30)];
        [topImgBtn setImage:[UIImage imageNamed:@"business_classificationwhite_default.png"] forState:UIControlStateNormal];
        [topImgBtn setTitle:@"分类" forState:UIControlStateNormal];
        [topImgBtn addTarget:self action:@selector(goGoodsTypeSearch:) forControlEvents:UIControlEventTouchUpInside];
        topImgBtn.titleLabel.font = [UIFont systemFontOfSize:[HbbUIStyleHelper fontSizeWithKey:kHbbUIStyleFontSizeStyleSmallSmallFontSize]];
        
        UIBarButtonItem *item = [[UIBarButtonItem alloc] initWithCustomView:topImgBtn];
        item.width = -16;
        //为了向左移动移动16个像素, 所以创建多了这个item
        UIBarButtonItem *sepaItem = [[UIBarButtonItem alloc] initWithBarButtonSystemItem:UIBarButtonSystemItemFixedSpace target:nil action:nil];
        sepaItem.width = -16;
        searchVC.navigationItem.leftBarButtonItems = @[sepaItem, item];
  • 相关阅读:
    拓扑排序
    数论初步(费马小定理)
    HDU
    HDU
    八月馒头
    萌新仓鼠,参上!
    新姿势
    字典树
    HDU
    Codeforce
  • 原文地址:https://www.cnblogs.com/apem/p/6207672.html
Copyright © 2011-2022 走看看