Skip to content

Commit

Permalink
update UI, tags
Browse files Browse the repository at this point in the history
  • Loading branch information
cranci1 committed Jun 1, 2024
1 parent 7c4c76d commit caecfcf
Show file tree
Hide file tree
Showing 5 changed files with 145 additions and 61 deletions.
Binary file modified .DS_Store
Binary file not shown.
Binary file not shown.
15 changes: 15 additions & 0 deletions AnimeGen/Extension/Tags.swift
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,21 @@ extension ViewController {
}

tagsLabel.attributedText = attributedString

tagsLabel.numberOfLines = tagsExpanded ? 0 : 1
tagsLabel.lineBreakMode = .byTruncatingTail
}

func setupTagLabelTapGesture() {
let tapGesture = UITapGestureRecognizer(target: self, action: #selector(toggleTagsExpansion))
tagsLabel.isUserInteractionEnabled = true
tagsLabel.addGestureRecognizer(tapGesture)
}

@objc func toggleTagsExpansion() {
tagsExpanded.toggle()
tagsLabel.numberOfLines = tagsExpanded ? 0 : 1
tagsLabel.lineBreakMode = tagsExpanded ? .byWordWrapping : .byTruncatingTail
}

func startLoadingIndicator() {
Expand Down
Loading

0 comments on commit caecfcf

Please sign in to comment.