cgoldsby / tvosmorebutton Goto Github PK
View Code? Open in Web Editor NEW๐บ tvOS '... More' Button
Home Page: https://github.com/cgoldsby/TvOSMoreButton
License: MIT License
๐บ tvOS '... More' Button
Home Page: https://github.com/cgoldsby/TvOSMoreButton
License: MIT License
There is no option to set text alignment. I am working with Arabic language. I have to change "label" which is a private variable.
Did you actually publish any versions to the Cocoapods trunk after 1.2.0?
Are there any near term plans to support Swift 4.2 and Xcode 10? The two issues that are stopping me are operators that have been removed (such as &~
and |=
). Other remaining issues are mostly renames such as NSAttributedStringKey
to NSAttributedString.Key
.
What did you do
Set the text more than can be reflected
What did you expect to happen?
The test is displayed partially, and trailing text is displayed completely
Text text text text text text text text text text text text text te
xt text text text text text text text text text text text text text
text text text text text text text text text text text tex... More
What happened instead?
The test is displayed partially, and trailing text is displayed partially
Text text text text text text text text text text text text text te
xt text text text text text text text text text text text text text
text text text text text text text text text text text tex... Mor...
Why did it happen?
Text and trailing text have different attributes, so you need to use NSMutableAttributedString to calculate the height.
func willFit(to size: CGSize,
ellipsesString: String = "",
trailingText: String = "",
attributes: [NSAttributedString.Key: Any],
trailingTextAttributes: [NSAttributedString.Key: Any]) -> Bool {
let attributedString = NSMutableAttributedString(string: self + ellipsesString, attributes: attributes)
let attributedTrailingString = NSAttributedString(string: trailingText, attributes: trailingTextAttributes)
attributedString.append(attributedTrailingString)
let boundedSize = CGSize(width: size.width, height: .greatestFiniteMagnitude)
let options: NSStringDrawingOptions = [.usesLineFragmentOrigin, .usesFontLeading]
let boundedRect = attributedString.boundingRect(with: boundedSize,
options: options,
context: nil)
return boundedRect.height <= size.height
}
Focus on TvOSMoreButton
Press remote touch surface to select button and hold, do not release remote "button"
While remote button still not released move focus to another focusable element. Another element is focused
Release remote button
After switching focus to another element, TvOSMoreButton should stay in unfocused appearance - no highlight
After focus switched to another element, TvOSMoreButton becomes highlighted
I'm sure the reason is that method applyPressUpAppearance()
called without checking isFocused == true
Hey, your library is really interesting.
The only problem I found was the README.md
, which lacks an Installation Section
I created this iOS Open source Readme Template so you can take a look on how to easily create an Installation Section
If you want, I can help you to organize the lib.
What are your thoughts? ๐
Hi!
I'm using xCode 8.3.3 to build a PopcornTimeTV app for tvOS 10.2.2. The problem is with 'NSAttributedStringKey' (use of undeclared type). Apparently, it's an iOS 11 implementation and xCode doesn't recognize it. It's on String+Truncation.swift and TvOSMoreButton.swift. Maybe it was already updated for xCode 9? Do you know how can I "fix" it?
Thanks very much!
Hi,
Since my Apple TV updated itself to tvOS 11, I've been trying to make PopcornTimeTV work again.
Unfortunately, during compilation this version of TvOSMoreButton causes two errors:
Any idea how to fix it? I'm still trying to find something online, but it's too specific.
Thank you very much,
Gustavo
EDIT: Using the previous version it compiled just fine, but it would be nice to understand how to fix the latest version.
Hi there, great library.
Please tell me... How can i change "... MORE"?
I want to change to "... NEXT", or something like.
TY!
We have fount error:
in " TvOSMoreButton.swift"
Can you help me to resolve it ?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.