简体   繁体   中英

show bullets in label on tableview cell swift ios

附上图片供参考

I have a table view, inside the table view I have multiple cells as shows in attached image. I want to show amenities items like: air conditioning, swimming pool, gym, tv cable etc like bullets.

How can I achieve this

I have all these value in my model coming from API response.

          let ac = "Air Conditioning"
          let tv = "TV Cable"
          let washing = "Washing Machine"
          let connectivity = "Wi-Fi"
          let gym = "Gym"

Good case for stack views...

  • Vertical UIStackView
  • Each "row" is a Horizontal UIStackView with Distribution: Fill Equally

Looks like this - showing Bounds Rectangles:

在此处输入图像描述

without the Bounds Rectangles:

在此处输入图像描述

view hierarchy:

在此处输入图像描述

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM