我正在尝试获取特定范围( @Entity
public class Employee {
@Id
@Column(name = "id")
@GeneratedValue(strategy = GenerationType.AUTO)
private Long langId;
@Column(name = "first_name")
private String firstName;
@Column(name = "last_name")
private String lastName;
@OneToMany(fetch = FetchType.EAGER)
@JoinColumn(name = "id", referencedColumnName = "employee_id")
private Set<Certificate> certificates;
)的矩形。
问题是代码与UITextRange
一起工作正常,我得到了
范围和矩形。不幸的是iOS 10
行:
iOS 9
返回if let rangeStart = textInput.position(from: textInput.beginningOfDocument, offset: location)
nil
答案 0 :(得分:1)
textView.isSelectable = true
此行在iOS 9中是必需的(在iOS 10中不是必需的)。