美文网首页
2018-07-27 UIToolbar和uinavigatio

2018-07-27 UIToolbar和uinavigatio

作者: 惊蛰_e3ce | 来源:发表于2018-07-27 10:09 被阅读0次

    UIToolbar *bar = [[UIToolbar alloc]init];
    [self.view addSubview:bar];
    [bar setBackgroundImage:[UIImage new] forToolbarPosition:UIBarPositionAny barMetrics:UIBarMetricsDefault];
    bar.clipsToBounds = YES;
    // [bar setShadowImage:[UIImage new] forToolbarPosition:UIBarPositionAny];
    UIBarButtonItem *backItem = [[UIBarButtonItem alloc]initWithImage:[[UIImage imageNamed:@"arrows_white"] imageWithRenderingMode:UIImageRenderingModeAlwaysOriginal] style:UIBarButtonItemStyleDone target:self action:@selector(backClick)];
    //可伸缩

    UIBarButtonItem* flexItem=[[UIBarButtonItem alloc]initWithBarButtonSystemItem:UIBarButtonSystemItemFixedSpace target:nil action:nil];
    bar.items = @[backItem,flexItem];
    

    相关文章

      网友评论

          本文标题:2018-07-27 UIToolbar和uinavigatio

          本文链接:https://www.haomeiwen.com/subject/fijwmftx.html