ios - 美团手机app中城市名称旁边的符号是哪个怎么打出来?
PHPz
PHPz 2017-04-17 16:33:41
0
5
803

PHPz
PHPz

学习是最好的投资!

reply all(5)
左手右手慢动作

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)
洪涛

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

巴扎黑

It’s just a picture

大家讲道理

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

Ty80

Try fontAwesome

Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!