在UIProgressView上绘制垂直线[Swift]

时间:2018-08-01 23:26:05

标签: swift graphics uiprogressview

给定基本的function trial(){ let schedulePattern = []; let initial = [1,3,4,2]; for(let i = 0; i < 3; i++){ let temp = initial.pop(); initial.splice(1,0,temp); console.log(initial); schedulePattern.push(initial.slice()); } return schedulePattern; } ​ ,如何在视图中添加一条(或多条)垂直线?

我目前的做法是:

@Embeddable
public class PostPK implements Serializable {

@Column(name="idPost")
private int postID;

@Column(name="idUsuario")
private int userIDFK;
-------------------------------
@Entity
@Table(name="Post")
public class Post {

@EmbeddedId
private PostPK id;

@ManyToOne
@MapsId(value="userIDFK")
@JoinColumn(name="idUsuario")
private Usuario usuario;

@OneToMany(mappedBy="post")
private List<Comentario> comentarios;

@Column(name="titulo")
private String titulo;

-----------------------------------
@Embeddable
public class ComentarioPK implements Serializable{

@Column(name="idComentario")
private int comentarioId;

@Column(name="idPost")
private int postIdFK;

---------------------------
@Entity
@Table(name="Comentario")
public class Comentario {

@EmbeddedId
private ComentarioPK id;

@ManyToOne
@MapsId("postIdFK")
@JoinColumn(name="idPost",referencedColumnName="idPost")
private Post post;

@Column(name="texto")
private String texto;

我的主要目标是在UIProgressView(可能是5条)上形成垂直线,以分隔%个部分。因此,每个部分代表(在5种情况下)20%。

0 个答案:

没有答案