Home  >  Q&A  >  body text

ios - 美团手机app中城市名称旁边的符号是哪个怎么打出来?

PHPzPHPz2715 days ago796

reply all(5)I'll reply

  • ringa_lee

    ringa_lee2017-04-17 16:35:41

    Swift:

        let leftBtn = UIButton(type: UIButtonType.Custom)
        leftBtn.frame = CGRectMake(0, 0, 65, 35)
        leftBtn.setImage(UIImage(named: "icon_xm_homepage_downArrow"), forState: UIControlState.Normal)
        leftBtn.adjustsImageWhenHighlighted = false

    // leftBtn.setTitleColor(UIColor.brownColor(), forState: UIControlState.Normal) //Set button font color

        leftBtn.contentHorizontalAlignment = UIControlContentHorizontalAlignment.Center
        leftBtn.titleEdgeInsets = UIEdgeInsetsMake(0, -50, 0, 0)
        leftBtn.imageEdgeInsets = UIEdgeInsetsMake(0, 45, 0, 0)
        leftBtn.setTitle("天津", forState: UIControlState.Normal)
        leftBtn.addTarget(self, action: "showLeft", forControlEvents: UIControlEvents.TouchUpInside)
        self.navigationItem.leftBarButtonItem = UIBarButtonItem.init(customView: leftBtn)

    reply
    0
  • PHP中文网

    PHP中文网2017-04-17 16:35:41

    Similar small icons generally have the following methods:

    1. Use css sprites to set background-position to set this kind of small picture

    2. Use an icon library, the more popular ones are Alibaba vector graphics library or bootstrap font icons

    3. You can just write a caret-down class using css yourself

    Meituan should use css sprites, which are relatively popular, have better compatibility and consume relatively less resources

    reply
    0
  • 巴扎黑

    巴扎黑2017-04-17 16:35:41

    It’s just a picture

    reply
    0
  • 大家讲道理

    大家讲道理2017-04-17 16:35:41

    http://s1.meituan.net/www/css/si/base.v21effb81.png
    Pictures, pick the one you like~

    reply
    0
  • PHP中文网

    PHP中文网2017-04-17 16:35:41

    Try fontAwesome

    reply
    0
  • Cancelreply